<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/fs.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/fs.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="Maybe">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX0ZTX0hfMA__"><span class="b">_LINUX_FS_H</span></a>
<a name="2" /><span class="Maybe">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X0xJTlVYX0ZTX0hfMA__"><span class="b">_LINUX_FS_H</span></a>
<a name="3" /><span class="Maybe">       3:</span> 
<a name="4" /><span class="Maybe">       4:</span> 
<a name="5" /><span class="Maybe">       5:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">linkage</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="6" /><span class="Maybe">       6:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">wait</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="7" /><span class="Maybe">       7:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">kdev_t</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="8" /><span class="Maybe">       8:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">dcache</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="9" /><span class="Maybe">       9:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">path</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="10" /><span class="Maybe">      10:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">stat</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="11" /><span class="Maybe">      11:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">cache</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="12" /><span class="Maybe">      12:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">list</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="13" /><span class="Maybe">      13:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">list_lru</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="14" /><span class="Maybe">      14:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">llist</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="15" /><span class="Maybe">      15:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">radix</span><span class="f">-</span><span class="b">tree</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="16" /><span class="Maybe">      16:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rbtree</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="17" /><span class="Maybe">      17:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">init</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="18" /><span class="Maybe">      18:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">pid</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="19" /><span class="Maybe">      19:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">bug</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="20" /><span class="Maybe">      20:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">mutex</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="21" /><span class="Maybe">      21:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">capability</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="22" /><span class="Maybe">      22:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">semaphore</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="23" /><span class="Maybe">      23:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">fiemap</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="24" /><span class="Maybe">      24:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">rculist_bl</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="25" /><span class="Maybe">      25:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">atomic</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="26" /><span class="Maybe">      26:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">shrinker</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="27" /><span class="Maybe">      27:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">migrate_mode</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="28" /><span class="Maybe">      28:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">uidgid</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="29" /><span class="Maybe">      29:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">lockdep</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="30" /><span class="Maybe">      30:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">percpu</span><span class="f">-</span><span class="b">rwsem</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="31" /><span class="Maybe">      31:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">blk_types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="32" /><span class="Maybe">      32:</span> 
<a name="33" /><span class="Maybe">      33:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">byteorder</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="34" /><span class="Maybe">      34:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">uapi</span><span class="f">/</span><span class="b">linux</span><span class="f">/</span><span class="b">fs</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="35" /><span class="Maybe">      35:</span> 
<a name="36" /><span class="Maybe">      36:</span> <span class="m">struct</span> <span class="b">export_operations</span><span class="f">;</span>
<a name="37" /><span class="Maybe">      37:</span> <span class="m">struct</span> <span class="b">hd_geometry</span><span class="f">;</span>
<a name="38" /><span class="Maybe">      38:</span> <span class="m">struct</span> <span class="b">iovec</span><span class="f">;</span>
<a name="39" /><span class="Maybe">      39:</span> <span class="m">struct</span> <span class="b">nameidata</span><span class="f">;</span>
<a name="40" /><span class="Maybe">      40:</span> <span class="m">struct</span> <span class="b">kiocb</span><span class="f">;</span>
<a name="41" /><span class="Maybe">      41:</span> <span class="m">struct</span> <span class="b">kobject</span><span class="f">;</span>
<a name="42" /><span class="Maybe">      42:</span> <span class="m">struct</span> <span class="b">pipe_inode_info</span><span class="f">;</span>
<a name="43" /><span class="Maybe">      43:</span> <span class="m">struct</span> <span class="b">poll_table_struct</span><span class="f">;</span>
<a name="44" /><span class="Maybe">      44:</span> <span class="m">struct</span> <span class="b">kstatfs</span><span class="f">;</span>
<a name="45" /><span class="Maybe">      45:</span> <span class="m">struct</span> <span class="b">vm_area_struct</span><span class="f">;</span>
<a name="46" /><span class="Maybe">      46:</span> <span class="m">struct</span> <span class="b">vfsmount</span><span class="f">;</span>
<a name="47" /><span class="Maybe">      47:</span> <span class="m">struct</span> <span class="b">cred</span><span class="f">;</span>
<a name="48" /><span class="Maybe">      48:</span> <span class="m">struct</span> <span class="b">swap_info_struct</span><span class="f">;</span>
<a name="49" /><span class="Maybe">      49:</span> <span class="m">struct</span> <span class="b">seq_file</span><span class="f">;</span>
<a name="50" /><span class="Maybe">      50:</span> <span class="m">struct</span> <span class="b">workqueue_struct</span><span class="f">;</span>
<a name="51" /><span class="Maybe">      51:</span> 
<a name="52" /><span class="Maybe">      52:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">inode_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="53" /><span class="Maybe">      53:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">inode_init_early</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="54" /><span class="Maybe">      54:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">files_init</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="55" /><span class="Maybe">      55:</span> 
<a name="56" /><span class="Maybe">      56:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">files_stat_struct</span> <span class="b">files_stat</span><span class="f">;</span>
<a name="57" /><span class="Maybe">      57:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">get_max_files</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="58" /><span class="Maybe">      58:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sysctl_nr_open</span><span class="f">;</span>
<a name="59" /><span class="Maybe">      59:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inodes_stat_t</span> <span class="b">inodes_stat</span><span class="f">;</span>
<a name="60" /><span class="Maybe">      60:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">leases_enable</span><span class="f">,</span> <span class="b">lease_break_time</span><span class="f">;</span>
<a name="61" /><span class="Maybe">      61:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sysctl_protected_symlinks</span><span class="f">;</span>
<a name="62" /><span class="Maybe">      62:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sysctl_protected_hardlinks</span><span class="f">;</span>
<a name="63" /><span class="Maybe">      63:</span> 
<a name="64" /><span class="Maybe">      64:</span> <span class="m">struct</span> <span class="b">buffer_head</span><span class="f">;</span>
<a name="65" /><span class="Maybe">      65:</span> <span class="m">typedef</span> <span class="m">int</span> <span class="f">(</span><span class="b">get_block_t</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">sector_t</span> <span class="b">iblock</span><span class="f">,</span>
<a name="66" /><span class="Maybe">      66:</span>             <span class="m">struct</span> <span class="b">buffer_head</span> <span class="f">*</span><span class="b">bh_result</span><span class="f">,</span> <span class="m">int</span> <span class="b">create</span><span class="f">)</span><span class="f">;</span>
<a name="67" /><span class="Maybe">      67:</span> <span class="m">typedef</span> <span class="m">void</span> <span class="f">(</span><span class="b">dio_iodone_t</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="b">iocb</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="68" /><span class="Maybe">      68:</span>             <span class="b">ssize_t</span> <span class="b">bytes</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="m">private</span><span class="f">)</span><span class="f">;</span>
<a name="69" /><span class="Maybe">      69:</span> 
<a name="70" /><span class="Maybe">      70:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX0VYRUNfMA__"><span class="b">MAY_EXEC</span></a>        <span class="c">0x00000001</span>
<a name="71" /><span class="Maybe">      71:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX1dSSVRFXzA_"><span class="b">MAY_WRITE</span></a>        <span class="c">0x00000002</span>
<a name="72" /><span class="Maybe">      72:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX1JFQURfMA__"><span class="b">MAY_READ</span></a>        <span class="c">0x00000004</span>
<a name="73" /><span class="Maybe">      73:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX0FQUEVORF8w"><span class="b">MAY_APPEND</span></a>        <span class="c">0x00000008</span>
<a name="74" /><span class="Maybe">      74:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX0FDQ0VTU18w"><span class="b">MAY_ACCESS</span></a>        <span class="c">0x00000010</span>
<a name="75" /><span class="Maybe">      75:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX09QRU5fMA__"><span class="b">MAY_OPEN</span></a>        <span class="c">0x00000020</span>
<a name="76" /><span class="Maybe">      76:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX0NIRElSXzA_"><span class="b">MAY_CHDIR</span></a>        <span class="c">0x00000040</span>
<a name="77" /><span class="Maybe">      77:</span> <span class="k">/* called from RCU mode, don&apos;t block */</span>
<a name="78" /><span class="Maybe">      78:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFZX05PVF9CTE9DS18w"><span class="b">MAY_NOT_BLOCK</span></a>        <span class="c">0x00000080</span>
<a name="79" /><span class="Maybe">      79:</span> 
<a name="80" /><span class="Maybe">      80:</span> <span class="k">/*</span>
<a name="81" /><span class="Maybe">      81:</span> <span class="k"> * flags in file.f_mode.  Note that FMODE_READ and FMODE_WRITE must correspond</span>
<a name="82" /><span class="Maybe">      82:</span> <span class="k"> * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()</span>
<a name="83" /><span class="Maybe">      83:</span> <span class="k"> */</span>
<a name="84" /><span class="Maybe">      84:</span> 
<a name="85" /><span class="Maybe">      85:</span> <span class="k">/* file is open for reading */</span>
<a name="86" /><span class="Maybe">      86:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfUkVBRF8w"><span class="b">FMODE_READ</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x1</span><span class="f">)</span>
<a name="87" /><span class="Maybe">      87:</span> <span class="k">/* file is open for writing */</span>
<a name="88" /><span class="Maybe">      88:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfV1JJVEVfMA__"><span class="b">FMODE_WRITE</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x2</span><span class="f">)</span>
<a name="89" /><span class="Maybe">      89:</span> <span class="k">/* file is seekable */</span>
<a name="90" /><span class="Maybe">      90:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfTFNFRUtfMA__"><span class="b">FMODE_LSEEK</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x4</span><span class="f">)</span>
<a name="91" /><span class="Maybe">      91:</span> <span class="k">/* file can be accessed using pread */</span>
<a name="92" /><span class="Maybe">      92:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfUFJFQURfMA__"><span class="b">FMODE_PREAD</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x8</span><span class="f">)</span>
<a name="93" /><span class="Maybe">      93:</span> <span class="k">/* file can be accessed using pwrite */</span>
<a name="94" /><span class="Maybe">      94:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfUFdSSVRFXzA_"><span class="b">FMODE_PWRITE</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x10</span><span class="f">)</span>
<a name="95" /><span class="Maybe">      95:</span> <span class="k">/* File is opened for execution with sys_execve / sys_uselib */</span>
<a name="96" /><span class="Maybe">      96:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfRVhFQ18w"><span class="b">FMODE_EXEC</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x20</span><span class="f">)</span>
<a name="97" /><span class="Maybe">      97:</span> <span class="k">/* File is opened with O_NDELAY (only set for block devices) */</span>
<a name="98" /><span class="Maybe">      98:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfTkRFTEFZXzA_"><span class="b">FMODE_NDELAY</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x40</span><span class="f">)</span>
<a name="99" /><span class="Maybe">      99:</span> <span class="k">/* File is opened with O_EXCL (only set for block devices) */</span>
<a name="100" /><span class="Maybe">     100:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfRVhDTF8w"><span class="b">FMODE_EXCL</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x80</span><span class="f">)</span>
<a name="101" /><span class="Maybe">     101:</span> <span class="k">/* File is opened using open(.., 3, ..) and is writeable only for ioctls</span>
<a name="102" /><span class="Maybe">     102:</span> <span class="k">   (specialy hack for floppy.c) */</span>
<a name="103" /><span class="Maybe">     103:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfV1JJVEVfSU9DVExfMA__"><span class="b">FMODE_WRITE_IOCTL</span></a>    <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x100</span><span class="f">)</span>
<a name="104" /><span class="Maybe">     104:</span> <span class="k">/* 32bit hashes as llseek() offset (for directories) */</span>
<a name="105" /><span class="Maybe">     105:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfMzJCSVRIQVNIXzA_"><span class="b">FMODE_32BITHASH</span></a>         <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x200</span><span class="f">)</span>
<a name="106" /><span class="Maybe">     106:</span> <span class="k">/* 64bit hashes as llseek() offset (for directories) */</span>
<a name="107" /><span class="Maybe">     107:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfNjRCSVRIQVNIXzA_"><span class="b">FMODE_64BITHASH</span></a>         <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x400</span><span class="f">)</span>
<a name="108" /><span class="Maybe">     108:</span> 
<a name="109" /><span class="Maybe">     109:</span> <span class="k">/*</span>
<a name="110" /><span class="Maybe">     110:</span> <span class="k"> * Don&apos;t update ctime and mtime.</span>
<a name="111" /><span class="Maybe">     111:</span> <span class="k"> *</span>
<a name="112" /><span class="Maybe">     112:</span> <span class="k"> * Currently a special hack for the XFS open_by_handle ioctl, but we&apos;ll</span>
<a name="113" /><span class="Maybe">     113:</span> <span class="k"> * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.</span>
<a name="114" /><span class="Maybe">     114:</span> <span class="k"> */</span>
<a name="115" /><span class="Maybe">     115:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfTk9DTVRJTUVfMA__"><span class="b">FMODE_NOCMTIME</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x800</span><span class="f">)</span>
<a name="116" /><span class="Maybe">     116:</span> 
<a name="117" /><span class="Maybe">     117:</span> <span class="k">/* Expect random access pattern */</span>
<a name="118" /><span class="Maybe">     118:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfUkFORE9NXzA_"><span class="b">FMODE_RANDOM</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x1000</span><span class="f">)</span>
<a name="119" /><span class="Maybe">     119:</span> 
<a name="120" /><span class="Maybe">     120:</span> <span class="k">/* File is huge (eg. /dev/kmem): treat loff_t as unsigned */</span>
<a name="121" /><span class="Maybe">     121:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfVU5TSUdORURfT0ZGU0VUXzA_"><span class="b">FMODE_UNSIGNED_OFFSET</span></a>    <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x2000</span><span class="f">)</span>
<a name="122" /><span class="Maybe">     122:</span> 
<a name="123" /><span class="Maybe">     123:</span> <span class="k">/* File is opened with O_PATH; almost nothing can be done with it */</span>
<a name="124" /><span class="Maybe">     124:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfUEFUSF8w"><span class="b">FMODE_PATH</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x4000</span><span class="f">)</span>
<a name="125" /><span class="Maybe">     125:</span> 
<a name="126" /><span class="Maybe">     126:</span> <span class="k">/* File was opened by fanotify and shouldn&apos;t generate fanotify events */</span>
<a name="127" /><span class="Maybe">     127:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfTk9OT1RJRllfMA__"><span class="b">FMODE_NONOTIFY</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="c">0x1000000</span><span class="f">)</span>
<a name="128" /><span class="Maybe">     128:</span> 
<a name="129" /><span class="Maybe">     129:</span> <span class="k">/*</span>
<a name="130" /><span class="Maybe">     130:</span> <span class="k"> * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector</span>
<a name="131" /><span class="Maybe">     131:</span> <span class="k"> * that indicates that they should check the contents of the iovec are</span>
<a name="132" /><span class="Maybe">     132:</span> <span class="k"> * valid, but not check the memory that the iovec elements</span>
<a name="133" /><span class="Maybe">     133:</span> <span class="k"> * points too.</span>
<a name="134" /><span class="Maybe">     134:</span> <span class="k"> */</span>
<a name="135" /><span class="Maybe">     135:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Q0hFQ0tfSU9WRUNfT05MWV8w"><span class="b">CHECK_IOVEC_ONLY</span></a> <span class="f">-</span><span class="c">1</span>
<a name="136" /><span class="Maybe">     136:</span> 
<a name="137" /><span class="Maybe">     137:</span> <span class="k">/*</span>
<a name="138" /><span class="Maybe">     138:</span> <span class="k"> * The below are the various read and write types that we support. Some of</span>
<a name="139" /><span class="Maybe">     139:</span> <span class="k"> * them include behavioral modifiers that send information down to the</span>
<a name="140" /><span class="Maybe">     140:</span> <span class="k"> * block layer and IO scheduler. Terminology:</span>
<a name="141" /><span class="Maybe">     141:</span> <span class="k"> *</span>
<a name="142" /><span class="Maybe">     142:</span> <span class="k"> *    The block layer uses device plugging to defer IO a little bit, in</span>
<a name="143" /><span class="Maybe">     143:</span> <span class="k"> *    the hope that we will see more IO very shortly. This increases</span>
<a name="144" /><span class="Maybe">     144:</span> <span class="k"> *    coalescing of adjacent IO and thus reduces the number of IOs we</span>
<a name="145" /><span class="Maybe">     145:</span> <span class="k"> *    have to send to the device. It also allows for better queuing,</span>
<a name="146" /><span class="Maybe">     146:</span> <span class="k"> *    if the IO isn&apos;t mergeable. If the caller is going to be waiting</span>
<a name="147" /><span class="Maybe">     147:</span> <span class="k"> *    for the IO, then he must ensure that the device is unplugged so</span>
<a name="148" /><span class="Maybe">     148:</span> <span class="k"> *    that the IO is dispatched to the driver.</span>
<a name="149" /><span class="Maybe">     149:</span> <span class="k"> *</span>
<a name="150" /><span class="Maybe">     150:</span> <span class="k"> *    All IO is handled async in Linux. This is fine for background</span>
<a name="151" /><span class="Maybe">     151:</span> <span class="k"> *    writes, but for reads or writes that someone waits for completion</span>
<a name="152" /><span class="Maybe">     152:</span> <span class="k"> *    on, we want to notify the block layer and IO scheduler so that they</span>
<a name="153" /><span class="Maybe">     153:</span> <span class="k"> *    know about it. That allows them to make better scheduling</span>
<a name="154" /><span class="Maybe">     154:</span> <span class="k"> *    decisions. So when the below references &apos;sync&apos; and &apos;async&apos;, it</span>
<a name="155" /><span class="Maybe">     155:</span> <span class="k"> *    is referencing this priority hint.</span>
<a name="156" /><span class="Maybe">     156:</span> <span class="k"> *</span>
<a name="157" /><span class="Maybe">     157:</span> <span class="k"> * With that in mind, the available types are:</span>
<a name="158" /><span class="Maybe">     158:</span> <span class="k"> *</span>
<a name="159" /><span class="Maybe">     159:</span> <span class="k"> * READ            A normal read operation. Device will be plugged.</span>
<a name="160" /><span class="Maybe">     160:</span> <span class="k"> * READ_SYNC        A synchronous read. Device is not plugged, caller can</span>
<a name="161" /><span class="Maybe">     161:</span> <span class="k"> *            immediately wait on this read without caring about</span>
<a name="162" /><span class="Maybe">     162:</span> <span class="k"> *            unplugging.</span>
<a name="163" /><span class="Maybe">     163:</span> <span class="k"> * READA        Used for read-ahead operations. Lower priority, and the</span>
<a name="164" /><span class="Maybe">     164:</span> <span class="k"> *            block layer could (in theory) choose to ignore this</span>
<a name="165" /><span class="Maybe">     165:</span> <span class="k"> *            request if it runs into resource problems.</span>
<a name="166" /><span class="Maybe">     166:</span> <span class="k"> * WRITE        A normal async write. Device will be plugged.</span>
<a name="167" /><span class="Maybe">     167:</span> <span class="k"> * WRITE_SYNC        Synchronous write. Identical to WRITE, but passes down</span>
<a name="168" /><span class="Maybe">     168:</span> <span class="k"> *            the hint that someone will be waiting on this IO</span>
<a name="169" /><span class="Maybe">     169:</span> <span class="k"> *            shortly. The write equivalent of READ_SYNC.</span>
<a name="170" /><span class="Maybe">     170:</span> <span class="k"> * WRITE_ODIRECT    Special case write for O_DIRECT only.</span>
<a name="171" /><span class="Maybe">     171:</span> <span class="k"> * WRITE_FLUSH        Like WRITE_SYNC but with preceding cache flush.</span>
<a name="172" /><span class="Maybe">     172:</span> <span class="k"> * WRITE_FUA        Like WRITE_SYNC but data is guaranteed to be on</span>
<a name="173" /><span class="Maybe">     173:</span> <span class="k"> *            non-volatile media on completion.</span>
<a name="174" /><span class="Maybe">     174:</span> <span class="k"> * WRITE_FLUSH_FUA    Combination of WRITE_FLUSH and FUA. The IO is preceded</span>
<a name="175" /><span class="Maybe">     175:</span> <span class="k"> *            by a cache flush and data is guaranteed to be on</span>
<a name="176" /><span class="Maybe">     176:</span> <span class="k"> *            non-volatile media on completion.</span>
<a name="177" /><span class="Maybe">     177:</span> <span class="k"> *</span>
<a name="178" /><span class="Maybe">     178:</span> <span class="k"> */</span>
<a name="179" /><span class="Maybe">     179:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UldfTUFTS18w"><span class="b">RW_MASK</span></a>            <a href="cpu.c_macros_noref.html#_UkVRX1dSSVRFXzA_"><span class="b">REQ_WRITE</span></a>
<a name="180" /><span class="Maybe">     180:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UldBX01BU0tfMA__"><span class="b">RWA_MASK</span></a>        <a href="cpu.c_macros_noref.html#_UkVRX1JBSEVBRF8w"><span class="b">REQ_RAHEAD</span></a>
<a name="181" /><span class="Maybe">     181:</span> 
<a name="182" /><span class="Maybe">     182:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UkVBRF8w"><span class="b">READ</span></a>            <span class="c">0</span>
<a name="183" /><span class="Maybe">     183:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a>            <a href="cpu.c_macros_noref.html#_UldfTUFTS18w"><span class="b">RW_MASK</span></a>
<a name="184" /><span class="Maybe">     184:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UkVBREFfMA__"><span class="b">READA</span></a>            <a href="cpu.c_macros_noref.html#_UldBX01BU0tfMA__"><span class="b">RWA_MASK</span></a>
<a name="185" /><span class="Maybe">     185:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_S0VSTkVMX1JFQURfMA__"><span class="b">KERNEL_READ</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_UkVBRF8w"><span class="b">READ</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_UkVRX0tFUk5FTF8w"><span class="b">REQ_KERNEL</span></a><span class="f">)</span>
<a name="186" /><span class="Maybe">     186:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_S0VSTkVMX1dSSVRFXzA_"><span class="b">KERNEL_WRITE</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_UkVRX0tFUk5FTF8w"><span class="b">REQ_KERNEL</span></a><span class="f">)</span>
<a name="187" /><span class="Maybe">     187:</span> 
<a name="188" /><span class="Maybe">     188:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UkVBRF9TWU5DXzA_"><span class="b">READ_SYNC</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_UkVBRF8w"><span class="b">READ</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a><span class="f">)</span>
<a name="189" /><span class="Maybe">     189:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfU1lOQ18w"><span class="b">WRITE_SYNC</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX05PSURMRV8w"><span class="b">REQ_NOIDLE</span></a><span class="f">)</span>
<a name="190" /><span class="Maybe">     190:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfT0RJUkVDVF8w"><span class="b">WRITE_ODIRECT</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a><span class="f">)</span>
<a name="191" /><span class="Maybe">     191:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfRkxVU0hfMA__"><span class="b">WRITE_FLUSH</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX05PSURMRV8w"><span class="b">REQ_NOIDLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX0ZMVVNIXzA_"><span class="b">REQ_FLUSH</span></a><span class="f">)</span>
<a name="192" /><span class="Maybe">     192:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfRlVBXzA_"><span class="b">WRITE_FUA</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX05PSURMRV8w"><span class="b">REQ_NOIDLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX0ZVQV8w"><span class="b">REQ_FUA</span></a><span class="f">)</span>
<a name="193" /><span class="Maybe">     193:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_V1JJVEVfRkxVU0hfRlVBXzA_"><span class="b">WRITE_FLUSH_FUA</span></a>        <span class="f">(</span><a href="cpu.c_macros_noref.html#_V1JJVEVfMA__"><span class="b">WRITE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX1NZTkNfMA__"><span class="b">REQ_SYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX05PSURMRV8w"><span class="b">REQ_NOIDLE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX0ZMVVNIXzA_"><span class="b">REQ_FLUSH</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UkVRX0ZVQV8w"><span class="b">REQ_FUA</span></a><span class="f">)</span>
<a name="194" /><span class="Maybe">     194:</span> 
<a name="195" /><span class="Maybe">     195:</span> <span class="k">/*</span>
<a name="196" /><span class="Maybe">     196:</span> <span class="k"> * Attribute flags.  These should be or-ed together to figure out what</span>
<a name="197" /><span class="Maybe">     197:</span> <span class="k"> * has been changed!</span>
<a name="198" /><span class="Maybe">     198:</span> <span class="k"> */</span>
<a name="199" /><span class="Maybe">     199:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9NT0RFXzA_"><span class="b">ATTR_MODE</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="200" /><span class="Maybe">     200:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9VSURfMA__"><span class="b">ATTR_UID</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">1</span><span class="f">)</span>
<a name="201" /><span class="Maybe">     201:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9HSURfMA__"><span class="b">ATTR_GID</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span>
<a name="202" /><span class="Maybe">     202:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9TSVpFXzA_"><span class="b">ATTR_SIZE</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">3</span><span class="f">)</span>
<a name="203" /><span class="Maybe">     203:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9BVElNRV8w"><span class="b">ATTR_ATIME</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">4</span><span class="f">)</span>
<a name="204" /><span class="Maybe">     204:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9NVElNRV8w"><span class="b">ATTR_MTIME</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">5</span><span class="f">)</span>
<a name="205" /><span class="Maybe">     205:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9DVElNRV8w"><span class="b">ATTR_CTIME</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">6</span><span class="f">)</span>
<a name="206" /><span class="Maybe">     206:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9BVElNRV9TRVRfMA__"><span class="b">ATTR_ATIME_SET</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">7</span><span class="f">)</span>
<a name="207" /><span class="Maybe">     207:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9NVElNRV9TRVRfMA__"><span class="b">ATTR_MTIME_SET</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">8</span><span class="f">)</span>
<a name="208" /><span class="Maybe">     208:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9GT1JDRV8w"><span class="b">ATTR_FORCE</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">9</span><span class="f">)</span> <span class="k">/* Not a change, but a change it */</span>
<a name="209" /><span class="Maybe">     209:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9BVFRSX0ZMQUdfMA__"><span class="b">ATTR_ATTR_FLAG</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">10</span><span class="f">)</span>
<a name="210" /><span class="Maybe">     210:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9LSUxMX1NVSURfMA__"><span class="b">ATTR_KILL_SUID</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">11</span><span class="f">)</span>
<a name="211" /><span class="Maybe">     211:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9LSUxMX1NHSURfMA__"><span class="b">ATTR_KILL_SGID</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">12</span><span class="f">)</span>
<a name="212" /><span class="Maybe">     212:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9GSUxFXzA_"><span class="b">ATTR_FILE</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">13</span><span class="f">)</span>
<a name="213" /><span class="Maybe">     213:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9LSUxMX1BSSVZfMA__"><span class="b">ATTR_KILL_PRIV</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">14</span><span class="f">)</span>
<a name="214" /><span class="Maybe">     214:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9PUEVOXzA_"><span class="b">ATTR_OPEN</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">15</span><span class="f">)</span> <span class="k">/* Truncating from open(O_TRUNC) */</span>
<a name="215" /><span class="Maybe">     215:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QVRUUl9USU1FU19TRVRfMA__"><span class="b">ATTR_TIMES_SET</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">16</span><span class="f">)</span>
<a name="216" /><span class="Maybe">     216:</span> 
<a name="217" /><span class="Maybe">     217:</span> <span class="k">/*</span>
<a name="218" /><span class="Maybe">     218:</span> <span class="k"> * This is the Inode Attributes structure, used for notify_change().  It</span>
<a name="219" /><span class="Maybe">     219:</span> <span class="k"> * uses the above definitions as flags, to know which values have changed.</span>
<a name="220" /><span class="Maybe">     220:</span> <span class="k"> * Also, in this manner, a Filesystem can look at only the values it cares</span>
<a name="221" /><span class="Maybe">     221:</span> <span class="k"> * about.  Basically, these are the attributes that the VFS layer can</span>
<a name="222" /><span class="Maybe">     222:</span> <span class="k"> * request to change from the FS layer.</span>
<a name="223" /><span class="Maybe">     223:</span> <span class="k"> *</span>
<a name="224" /><span class="Maybe">     224:</span> <span class="k"> * Derek Atkins &lt;warlord@MIT.EDU&gt; 94-10-20</span>
<a name="225" /><span class="Maybe">     225:</span> <span class="k"> */</span>
<a name="226" /><span class="Maybe">     226:</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">{</span>
<a name="227" /><span class="Maybe">     227:</span>     <span class="m">unsigned</span> <span class="m">int</span>    <span class="b">ia_valid</span><span class="f">;</span>
<a name="228" /><span class="Maybe">     228:</span>     <span class="b">umode_t</span>        <span class="b">ia_mode</span><span class="f">;</span>
<a name="229" /><span class="Maybe">     229:</span>     <span class="b">kuid_t</span>        <span class="b">ia_uid</span><span class="f">;</span>
<a name="230" /><span class="Maybe">     230:</span>     <span class="b">kgid_t</span>        <span class="b">ia_gid</span><span class="f">;</span>
<a name="231" /><span class="Maybe">     231:</span>     <span class="b">loff_t</span>        <span class="b">ia_size</span><span class="f">;</span>
<a name="232" /><span class="Maybe">     232:</span>     <span class="m">struct</span> <span class="b">timespec</span>    <span class="b">ia_atime</span><span class="f">;</span>
<a name="233" /><span class="Maybe">     233:</span>     <span class="m">struct</span> <span class="b">timespec</span>    <span class="b">ia_mtime</span><span class="f">;</span>
<a name="234" /><span class="Maybe">     234:</span>     <span class="m">struct</span> <span class="b">timespec</span>    <span class="b">ia_ctime</span><span class="f">;</span>
<a name="235" /><span class="Maybe">     235:</span> 
<a name="236" /><span class="Maybe">     236:</span>     <span class="k">/*</span>
<a name="237" /><span class="Maybe">     237:</span> <span class="k">     * Not an attribute, but an auxiliary info for filesystems wanting to</span>
<a name="238" /><span class="Maybe">     238:</span> <span class="k">     * implement an ftruncate() like method.  NOTE: filesystem should</span>
<a name="239" /><span class="Maybe">     239:</span> <span class="k">     * check for (ia_valid &amp; ATTR_FILE), and not for (ia_file != NULL).</span>
<a name="240" /><span class="Maybe">     240:</span> <span class="k">     */</span>
<a name="241" /><span class="Maybe">     241:</span>     <span class="m">struct</span> <span class="b">file</span>    <span class="f">*</span><span class="b">ia_file</span><span class="f">;</span>
<a name="242" /><span class="Maybe">     242:</span> <span class="f">}</span><span class="f">;</span>
<a name="243" /><span class="Maybe">     243:</span> 
<a name="244" /><span class="Maybe">     244:</span> <span class="k">/*</span>
<a name="245" /><span class="Maybe">     245:</span> <span class="k"> * Includes for diskquotas.</span>
<a name="246" /><span class="Maybe">     246:</span> <span class="k"> */</span>
<a name="247" /><span class="Maybe">     247:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">quota</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="248" /><span class="Maybe">     248:</span> 
<a name="249" /><span class="Maybe">     249:</span> <span class="k">/** </span>
<a name="250" /><span class="Maybe">     250:</span> <span class="k"> * enum positive_aop_returns - aop return codes with specific semantics</span>
<a name="251" /><span class="Maybe">     251:</span> <span class="k"> *</span>
<a name="252" /><span class="Maybe">     252:</span> <span class="k"> * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has</span>
<a name="253" /><span class="Maybe">     253:</span> <span class="k"> *                 completed, that the page is still locked, and</span>
<a name="254" /><span class="Maybe">     254:</span> <span class="k"> *                 should be considered active.  The VM uses this hint</span>
<a name="255" /><span class="Maybe">     255:</span> <span class="k"> *                 to return the page to the active list -- it won&apos;t</span>
<a name="256" /><span class="Maybe">     256:</span> <span class="k"> *                 be a candidate for writeback again in the near</span>
<a name="257" /><span class="Maybe">     257:</span> <span class="k"> *                 future.  Other callers must be careful to unlock</span>
<a name="258" /><span class="Maybe">     258:</span> <span class="k"> *                 the page if they get this return.  Returned by</span>
<a name="259" /><span class="Maybe">     259:</span> <span class="k"> *                 writepage(); </span>
<a name="260" /><span class="Maybe">     260:</span> <span class="k"> *</span>
<a name="261" /><span class="Maybe">     261:</span> <span class="k"> * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has</span>
<a name="262" /><span class="Maybe">     262:</span> <span class="k"> *              unlocked it and the page might have been truncated.</span>
<a name="263" /><span class="Maybe">     263:</span> <span class="k"> *              The caller should back up to acquiring a new page and</span>
<a name="264" /><span class="Maybe">     264:</span> <span class="k"> *              trying again.  The aop will be taking reasonable</span>
<a name="265" /><span class="Maybe">     265:</span> <span class="k"> *              precautions not to livelock.  If the caller held a page</span>
<a name="266" /><span class="Maybe">     266:</span> <span class="k"> *              reference, it should drop it before retrying.  Returned</span>
<a name="267" /><span class="Maybe">     267:</span> <span class="k"> *              by readpage().</span>
<a name="268" /><span class="Maybe">     268:</span> <span class="k"> *</span>
<a name="269" /><span class="Maybe">     269:</span> <span class="k"> * address_space_operation functions return these large constants to indicate</span>
<a name="270" /><span class="Maybe">     270:</span> <span class="k"> * special semantics to the caller.  These are much larger than the bytes in a</span>
<a name="271" /><span class="Maybe">     271:</span> <span class="k"> * page to allow for functions that return the number of bytes operated on in a</span>
<a name="272" /><span class="Maybe">     272:</span> <span class="k"> * given page.</span>
<a name="273" /><span class="Maybe">     273:</span> <span class="k"> */</span>
<a name="274" /><span class="Maybe">     274:</span> 
<a name="275" /><span class="Maybe">     275:</span> <span class="m">enum</span> <span class="b">positive_aop_returns</span> <span class="f">{</span>
<a name="276" /><span class="Maybe">     276:</span>     <span class="b">AOP_WRITEPAGE_ACTIVATE</span>    <span class="f">=</span> <span class="c">0x80000</span><span class="f">,</span>
<a name="277" /><span class="Maybe">     277:</span>     <span class="b">AOP_TRUNCATED_PAGE</span>    <span class="f">=</span> <span class="c">0x80001</span><span class="f">,</span>
<a name="278" /><span class="Maybe">     278:</span> <span class="f">}</span><span class="f">;</span>
<a name="279" /><span class="Maybe">     279:</span> 
<a name="280" /><span class="Maybe">     280:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QU9QX0ZMQUdfVU5JTlRFUlJVUFRJQkxFXzA_"><span class="b">AOP_FLAG_UNINTERRUPTIBLE</span></a>    <span class="c">0x0001</span> <span class="k">/* will not do a short write */</span>
<a name="281" /><span class="Maybe">     281:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QU9QX0ZMQUdfQ09OVF9FWFBBTkRfMA__"><span class="b">AOP_FLAG_CONT_EXPAND</span></a>        <span class="c">0x0002</span> <span class="k">/* called from cont_expand */</span>
<a name="282" /><span class="Maybe">     282:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QU9QX0ZMQUdfTk9GU18w"><span class="b">AOP_FLAG_NOFS</span></a>            <span class="c">0x0004</span> <span class="k">/* used by filesystem to direct</span>
<a name="283" /><span class="Maybe">     283:</span> <span class="k">                        * helper code (eg buffer layer)</span>
<a name="284" /><span class="Maybe">     284:</span> <span class="k">                        * to clear GFP_FS from alloc */</span>
<a name="285" /><span class="Maybe">     285:</span> 
<a name="286" /><span class="Maybe">     286:</span> <span class="k">/*</span>
<a name="287" /><span class="Maybe">     287:</span> <span class="k"> * oh the beauties of C type declarations.</span>
<a name="288" /><span class="Maybe">     288:</span> <span class="k"> */</span>
<a name="289" /><span class="Maybe">     289:</span> <span class="m">struct</span> <span class="b">page</span><span class="f">;</span>
<a name="290" /><span class="Maybe">     290:</span> <span class="m">struct</span> <span class="b">address_space</span><span class="f">;</span>
<a name="291" /><span class="Maybe">     291:</span> <span class="m">struct</span> <span class="b">writeback_control</span><span class="f">;</span>
<a name="292" /><span class="Maybe">     292:</span> 
<a name="293" /><span class="Maybe">     293:</span> <span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">{</span>
<a name="294" /><span class="Maybe">     294:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">;</span>
<a name="295" /><span class="Maybe">     295:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">;</span>
<a name="296" /><span class="Maybe">     296:</span>     <span class="b">size_t</span> <span class="b">iov_offset</span><span class="f">;</span>
<a name="297" /><span class="Maybe">     297:</span>     <span class="b">size_t</span> <span class="b">count</span><span class="f">;</span>
<a name="298" /><span class="Maybe">     298:</span> <span class="f">}</span><span class="f">;</span>
<a name="299" /><span class="Maybe">     299:</span> 
<a name="300" /><span class="Maybe">     300:</span> <span class="b">size_t</span> <span class="b">iov_iter_copy_from_user_atomic</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span>
<a name="301" /><span class="Maybe">     301:</span>         <span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">offset</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="302" /><span class="Maybe">     302:</span> <span class="b">size_t</span> <span class="b">iov_iter_copy_from_user</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span>
<a name="303" /><span class="Maybe">     303:</span>         <span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">offset</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="304" /><span class="Maybe">     304:</span> <span class="m">void</span> <span class="b">iov_iter_advance</span><span class="f">(</span><span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="305" /><span class="Maybe">     305:</span> <span class="m">int</span> <span class="b">iov_iter_fault_in_readable</span><span class="f">(</span><span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="306" /><span class="Maybe">     306:</span> <span class="b">size_t</span> <span class="b">iov_iter_single_seg_count</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="307" /><span class="Maybe">     307:</span> 
<a name="308" /><span class="Maybe">     308:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">iov_iter_init</span><span class="f">(</span><span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">,</span>
<a name="309" /><span class="Maybe">     309:</span>             <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">,</span>
<a name="310" /><span class="Maybe">     310:</span>             <span class="b">size_t</span> <span class="b">count</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">written</span><span class="f">)</span>
<a name="311" /><span class="Maybe">     311:</span> <span class="f">{</span>
<a name="312" /><span class="Maybe">     312:</span>     <span class="b">i</span><span class="f">-&gt;</span><span class="b">iov</span> <span class="f">=</span> <span class="b">iov</span><span class="f">;</span>
<a name="313" /><span class="Maybe">     313:</span>     <span class="b">i</span><span class="f">-&gt;</span><span class="b">nr_segs</span> <span class="f">=</span> <span class="b">nr_segs</span><span class="f">;</span>
<a name="314" /><span class="Maybe">     314:</span>     <span class="b">i</span><span class="f">-&gt;</span><span class="b">iov_offset</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="315" /><span class="Maybe">     315:</span>     <span class="b">i</span><span class="f">-&gt;</span><span class="b">count</span> <span class="f">=</span> <span class="b">count</span> <span class="f">+</span> <span class="b">written</span><span class="f">;</span>
<a name="316" /><span class="Maybe">     316:</span> 
<a name="317" /><span class="Maybe">     317:</span>     <span class="b">iov_iter_advance</span><span class="f">(</span><span class="b">i</span><span class="f">,</span> <span class="b">written</span><span class="f">)</span><span class="f">;</span>
<a name="318" /><span class="Maybe">     318:</span> <span class="f">}</span>
<a name="319" /><span class="Maybe">     319:</span> 
<a name="320" /><span class="Maybe">     320:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">size_t</span> <span class="b">iov_iter_count</span><span class="f">(</span><span class="m">struct</span> <span class="b">iov_iter</span> <span class="f">*</span><span class="b">i</span><span class="f">)</span>
<a name="321" /><span class="Maybe">     321:</span> <span class="f">{</span>
<a name="322" /><span class="Maybe">     322:</span>     <span class="m">return</span> <span class="b">i</span><span class="f">-&gt;</span><span class="b">count</span><span class="f">;</span>
<a name="323" /><span class="Maybe">     323:</span> <span class="f">}</span>
<a name="324" /><span class="Maybe">     324:</span> 
<a name="325" /><span class="Maybe">     325:</span> <span class="k">/*</span>
<a name="326" /><span class="Maybe">     326:</span> <span class="k"> * &quot;descriptor&quot; for what we&apos;re up to with a read.</span>
<a name="327" /><span class="Maybe">     327:</span> <span class="k"> * This allows us to use the same read code yet</span>
<a name="328" /><span class="Maybe">     328:</span> <span class="k"> * have multiple different users of the data that</span>
<a name="329" /><span class="Maybe">     329:</span> <span class="k"> * we read from a file.</span>
<a name="330" /><span class="Maybe">     330:</span> <span class="k"> *</span>
<a name="331" /><span class="Maybe">     331:</span> <span class="k"> * The simplest case just copies the data to user</span>
<a name="332" /><span class="Maybe">     332:</span> <span class="k"> * mode.</span>
<a name="333" /><span class="Maybe">     333:</span> <span class="k"> */</span>
<a name="334" /><span class="Maybe">     334:</span> <span class="m">typedef</span> <span class="m">struct</span> <span class="f">{</span>
<a name="335" /><span class="Maybe">     335:</span>     <span class="b">size_t</span> <span class="b">written</span><span class="f">;</span>
<a name="336" /><span class="Maybe">     336:</span>     <span class="b">size_t</span> <span class="b">count</span><span class="f">;</span>
<a name="337" /><span class="Maybe">     337:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="338" /><span class="Maybe">     338:</span>         <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">;</span>
<a name="339" /><span class="Maybe">     339:</span>         <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">;</span>
<a name="340" /><span class="Maybe">     340:</span>     <span class="f">}</span> <span class="b">arg</span><span class="f">;</span>
<a name="341" /><span class="Maybe">     341:</span>     <span class="m">int</span> <span class="b">error</span><span class="f">;</span>
<a name="342" /><span class="Maybe">     342:</span> <span class="f">}</span> <span class="b">read_descriptor_t</span><span class="f">;</span>
<a name="343" /><span class="Maybe">     343:</span> 
<a name="344" /><span class="Maybe">     344:</span> <span class="m">typedef</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">read_actor_t</span><span class="f">)</span><span class="f">(</span><span class="b">read_descriptor_t</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span>
<a name="345" /><span class="Maybe">     345:</span>         <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="346" /><span class="Maybe">     346:</span> 
<a name="347" /><span class="Maybe">     347:</span> <span class="m">struct</span> <span class="b">address_space_operations</span> <span class="f">{</span>
<a name="348" /><span class="Maybe">     348:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">writepage</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span> <span class="m">struct</span> <span class="b">writeback_control</span> <span class="f">*</span><span class="b">wbc</span><span class="f">)</span><span class="f">;</span>
<a name="349" /><span class="Maybe">     349:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">readpage</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="350" /><span class="Maybe">     350:</span> 
<a name="351" /><span class="Maybe">     351:</span>     <span class="k">/* Write back some dirty pages from this mapping. */</span>
<a name="352" /><span class="Maybe">     352:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">writepages</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">writeback_control</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="353" /><span class="Maybe">     353:</span> 
<a name="354" /><span class="Maybe">     354:</span>     <span class="k">/* Set a page dirty.  Return true if this dirtied it */</span>
<a name="355" /><span class="Maybe">     355:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">set_page_dirty</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">)</span><span class="f">;</span>
<a name="356" /><span class="Maybe">     356:</span> 
<a name="357" /><span class="Maybe">     357:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">readpages</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="358" /><span class="Maybe">     358:</span>             <span class="m">struct</span> <span class="b">list_head</span> <span class="f">*</span><span class="b">pages</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">nr_pages</span><span class="f">)</span><span class="f">;</span>
<a name="359" /><span class="Maybe">     359:</span> 
<a name="360" /><span class="Maybe">     360:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">write_begin</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="361" /><span class="Maybe">     361:</span>                 <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">flags</span><span class="f">,</span>
<a name="362" /><span class="Maybe">     362:</span>                 <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">*</span><span class="b">pagep</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="363" /><span class="Maybe">     363:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">write_end</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="364" /><span class="Maybe">     364:</span>                 <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">copied</span><span class="f">,</span>
<a name="365" /><span class="Maybe">     365:</span>                 <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="366" /><span class="Maybe">     366:</span> 
<a name="367" /><span class="Maybe">     367:</span>     <span class="k">/* Unfortunately this kludge is needed for FIBMAP. Don&apos;t use it */</span>
<a name="368" /><span class="Maybe">     368:</span>     <span class="b">sector_t</span> <span class="f">(</span><span class="f">*</span><span class="b">bmap</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span> <span class="b">sector_t</span><span class="f">)</span><span class="f">;</span>
<a name="369" /><span class="Maybe">     369:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">invalidatepage</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="370" /><span class="Maybe">     370:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">releasepage</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="b">gfp_t</span><span class="f">)</span><span class="f">;</span>
<a name="371" /><span class="Maybe">     371:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">freepage</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="372" /><span class="Maybe">     372:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">direct_IO</span><span class="f">)</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span>
<a name="373" /><span class="Maybe">     373:</span>             <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">)</span><span class="f">;</span>
<a name="374" /><span class="Maybe">     374:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">get_xip_mem</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a><span class="f">,</span> <span class="m">int</span><span class="f">,</span>
<a name="375" /><span class="Maybe">     375:</span>                         <span class="m">void</span> <span class="f">*</span><span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="376" /><span class="Maybe">     376:</span>     <span class="k">/*</span>
<a name="377" /><span class="Maybe">     377:</span> <span class="k">     * migrate the contents of a page to the specified target. If</span>
<a name="378" /><span class="Maybe">     378:</span> <span class="k">     * migrate_mode is MIGRATE_ASYNC, it must not block.</span>
<a name="379" /><span class="Maybe">     379:</span> <span class="k">     */</span>
<a name="380" /><span class="Maybe">     380:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">migratepage</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span>
<a name="381" /><span class="Maybe">     381:</span>             <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">enum</span> <span class="b">migrate_mode</span><span class="f">)</span><span class="f">;</span>
<a name="382" /><span class="Maybe">     382:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">launder_page</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="383" /><span class="Maybe">     383:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">is_partially_uptodate</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="b">read_descriptor_t</span> <span class="f">*</span><span class="f">,</span>
<a name="384" /><span class="Maybe">     384:</span>                     <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="385" /><span class="Maybe">     385:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">is_dirty_writeback</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">bool</span> <span class="f">*</span><span class="f">,</span> <span class="m">bool</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="386" /><span class="Maybe">     386:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">error_remove_page</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="387" /><span class="Maybe">     387:</span> 
<a name="388" /><span class="Maybe">     388:</span>     <span class="k">/* swapfile support */</span>
<a name="389" /><span class="Maybe">     389:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">swap_activate</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">swap_info_struct</span> <span class="f">*</span><span class="b">sis</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span>
<a name="390" /><span class="Maybe">     390:</span>                 <span class="b">sector_t</span> <span class="f">*</span><span class="b">span</span><span class="f">)</span><span class="f">;</span>
<a name="391" /><span class="Maybe">     391:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">swap_deactivate</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="392" /><span class="Maybe">     392:</span> <span class="f">}</span><span class="f">;</span>
<a name="393" /><span class="Maybe">     393:</span> 
<a name="394" /><span class="Maybe">     394:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">address_space_operations</span> <span class="b">empty_aops</span><span class="f">;</span>
<a name="395" /><span class="Maybe">     395:</span> 
<a name="396" /><span class="Maybe">     396:</span> <span class="k">/*</span>
<a name="397" /><span class="Maybe">     397:</span> <span class="k"> * pagecache_write_begin/pagecache_write_end must be used by general code</span>
<a name="398" /><span class="Maybe">     398:</span> <span class="k"> * to write into the pagecache.</span>
<a name="399" /><span class="Maybe">     399:</span> <span class="k"> */</span>
<a name="400" /><span class="Maybe">     400:</span> <span class="m">int</span> <span class="b">pagecache_write_begin</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="401" /><span class="Maybe">     401:</span>                 <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">flags</span><span class="f">,</span>
<a name="402" /><span class="Maybe">     402:</span>                 <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">*</span><span class="b">pagep</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="403" /><span class="Maybe">     403:</span> 
<a name="404" /><span class="Maybe">     404:</span> <span class="m">int</span> <span class="b">pagecache_write_end</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="405" /><span class="Maybe">     405:</span>                 <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">copied</span><span class="f">,</span>
<a name="406" /><span class="Maybe">     406:</span>                 <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="407" /><span class="Maybe">     407:</span> 
<a name="408" /><span class="Maybe">     408:</span> <span class="m">struct</span> <span class="b">backing_dev_info</span><span class="f">;</span>
<a name="409" /><span class="Maybe">     409:</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">{</span>
<a name="410" /><span class="Maybe">     410:</span>     <span class="m">struct</span> <span class="b">inode</span>        <span class="f">*</span><span class="b">host</span><span class="f">;</span>        <span class="k">/* owner: inode, block_device */</span>
<a name="411" /><span class="Maybe">     411:</span>     <span class="m">struct</span> <span class="b">radix_tree_root</span>    <span class="b">page_tree</span><span class="f">;</span>    <span class="k">/* radix tree of all pages */</span>
<a name="412" /><span class="Maybe">     412:</span>     <span class="b">spinlock_t</span>        <span class="b">tree_lock</span><span class="f">;</span>    <span class="k">/* and lock protecting it */</span>
<a name="413" /><span class="Maybe">     413:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">i_mmap_writable</span><span class="f">;</span><span class="k">/* count VM_SHARED mappings */</span>
<a name="414" /><span class="Maybe">     414:</span>     <span class="m">struct</span> <span class="b">rb_root</span>        <span class="b">i_mmap</span><span class="f">;</span>        <span class="k">/* tree of private and shared mappings */</span>
<a name="415" /><span class="Maybe">     415:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">i_mmap_nonlinear</span><span class="f">;</span><span class="k">/*list VM_NONLINEAR mappings */</span>
<a name="416" /><span class="Maybe">     416:</span>     <span class="m">struct</span> <span class="b">mutex</span>        <span class="b">i_mmap_mutex</span><span class="f">;</span>    <span class="k">/* protect tree, count, list */</span>
<a name="417" /><span class="Maybe">     417:</span>     <span class="k">/* Protected by tree_lock together with the radix tree */</span>
<a name="418" /><span class="Maybe">     418:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">nrpages</span><span class="f">;</span>    <span class="k">/* number of total pages */</span>
<a name="419" /><span class="Maybe">     419:</span>     <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a>            <span class="b">writeback_index</span><span class="f">;</span><span class="k">/* writeback starts here */</span>
<a name="420" /><span class="Maybe">     420:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">address_space_operations</span> <span class="f">*</span><span class="b">a_ops</span><span class="f">;</span>    <span class="k">/* methods */</span>
<a name="421" /><span class="Maybe">     421:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">flags</span><span class="f">;</span>        <span class="k">/* error bits/gfp mask */</span>
<a name="422" /><span class="Maybe">     422:</span>     <span class="m">struct</span> <span class="b">backing_dev_info</span> <span class="f">*</span><span class="b">backing_dev_info</span><span class="f">;</span> <span class="k">/* device readahead, etc */</span>
<a name="423" /><span class="Maybe">     423:</span>     <span class="b">spinlock_t</span>        <span class="b">private_lock</span><span class="f">;</span>    <span class="k">/* for use by the address_space */</span>
<a name="424" /><span class="Maybe">     424:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">private_list</span><span class="f">;</span>    <span class="k">/* ditto */</span>
<a name="425" /><span class="Maybe">     425:</span>     <span class="m">void</span>            <span class="f">*</span><span class="b">private_data</span><span class="f">;</span>    <span class="k">/* ditto */</span>
<a name="426" /><span class="Maybe">     426:</span> <span class="f">}</span> <span class="b">__attribute__</span><span class="f">(</span><span class="f">(</span><span class="b">aligned</span><span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="m">long</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="427" /><span class="Maybe">     427:</span>     <span class="k">/*</span>
<a name="428" /><span class="Maybe">     428:</span> <span class="k">     * On most architectures that alignment is already the case; but</span>
<a name="429" /><span class="Maybe">     429:</span> <span class="k">     * must be enforced here for CRIS, to let the least significant bit</span>
<a name="430" /><span class="Maybe">     430:</span> <span class="k">     * of struct page&apos;s &quot;mapping&quot; pointer be used for PAGE_MAPPING_ANON.</span>
<a name="431" /><span class="Maybe">     431:</span> <span class="k">     */</span>
<a name="432" /><span class="Maybe">     432:</span> <span class="m">struct</span> <span class="b">request_queue</span><span class="f">;</span>
<a name="433" /><span class="Maybe">     433:</span> 
<a name="434" /><span class="Maybe">     434:</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">{</span>
<a name="435" /><span class="Maybe">     435:</span>     <span class="b">dev_t</span>            <span class="b">bd_dev</span><span class="f">;</span>  <span class="k">/* not a kdev_t - it&apos;s a search key */</span>
<a name="436" /><span class="Maybe">     436:</span>     <span class="m">int</span>            <span class="b">bd_openers</span><span class="f">;</span>
<a name="437" /><span class="Maybe">     437:</span>     <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span>        <span class="b">bd_inode</span><span class="f">;</span>    <span class="k">/* will die */</span>
<a name="438" /><span class="Maybe">     438:</span>     <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span>    <span class="b">bd_super</span><span class="f">;</span>
<a name="439" /><span class="Maybe">     439:</span>     <span class="m">struct</span> <span class="b">mutex</span>        <span class="b">bd_mutex</span><span class="f">;</span>    <span class="k">/* open/close mutex */</span>
<a name="440" /><span class="Maybe">     440:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">bd_inodes</span><span class="f">;</span>
<a name="441" /><span class="Maybe">     441:</span>     <span class="m">void</span> <span class="f">*</span>            <span class="b">bd_claiming</span><span class="f">;</span>
<a name="442" /><span class="Maybe">     442:</span>     <span class="m">void</span> <span class="f">*</span>            <span class="b">bd_holder</span><span class="f">;</span>
<a name="443" /><span class="Maybe">     443:</span>     <span class="m">int</span>            <span class="b">bd_holders</span><span class="f">;</span>
<a name="444" /><span class="Maybe">     444:</span>     <span class="m">bool</span>            <span class="b">bd_write_holder</span><span class="f">;</span>
<a name="445" /><span class="Maybe">     445:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NZU0ZTXzA_"><span class="b">CONFIG_SYSFS</span></a>
<a name="446" /><span class="Maybe">     446:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">bd_holder_disks</span><span class="f">;</span>
<a name="447" /><span class="Maybe">     447:</span> <span class="f">#</span><span class="n">endif</span>
<a name="448" /><span class="Maybe">     448:</span>     <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span>    <span class="b">bd_contains</span><span class="f">;</span>
<a name="449" /><span class="Maybe">     449:</span>     <span class="m">unsigned</span>        <span class="b">bd_block_size</span><span class="f">;</span>
<a name="450" /><span class="Maybe">     450:</span>     <span class="m">struct</span> <span class="b">hd_struct</span> <span class="f">*</span>    <span class="b">bd_part</span><span class="f">;</span>
<a name="451" /><span class="Maybe">     451:</span>     <span class="k">/* number of times partitions within this device have been opened. */</span>
<a name="452" /><span class="Maybe">     452:</span>     <span class="m">unsigned</span>        <span class="b">bd_part_count</span><span class="f">;</span>
<a name="453" /><span class="Maybe">     453:</span>     <span class="m">int</span>            <span class="b">bd_invalidated</span><span class="f">;</span>
<a name="454" /><span class="Maybe">     454:</span>     <span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span>    <span class="b">bd_disk</span><span class="f">;</span>
<a name="455" /><span class="Maybe">     455:</span>     <span class="m">struct</span> <span class="b">request_queue</span> <span class="f">*</span>  <span class="b">bd_queue</span><span class="f">;</span>
<a name="456" /><span class="Maybe">     456:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">bd_list</span><span class="f">;</span>
<a name="457" /><span class="Maybe">     457:</span>     <span class="k">/*</span>
<a name="458" /><span class="Maybe">     458:</span> <span class="k">     * Private data.  You must have bd_claim&apos;ed the block_device</span>
<a name="459" /><span class="Maybe">     459:</span> <span class="k">     * to use this.  NOTE:  bd_claim allows an owner to claim</span>
<a name="460" /><span class="Maybe">     460:</span> <span class="k">     * the same device multiple times, the owner must take special</span>
<a name="461" /><span class="Maybe">     461:</span> <span class="k">     * care to not mess up bd_private for that case.</span>
<a name="462" /><span class="Maybe">     462:</span> <span class="k">     */</span>
<a name="463" /><span class="Maybe">     463:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">bd_private</span><span class="f">;</span>
<a name="464" /><span class="Maybe">     464:</span> 
<a name="465" /><span class="Maybe">     465:</span>     <span class="k">/* The counter of freeze processes */</span>
<a name="466" /><span class="Maybe">     466:</span>     <span class="m">int</span>            <span class="b">bd_fsfreeze_count</span><span class="f">;</span>
<a name="467" /><span class="Maybe">     467:</span>     <span class="k">/* Mutex for freeze */</span>
<a name="468" /><span class="Maybe">     468:</span>     <span class="m">struct</span> <span class="b">mutex</span>        <span class="b">bd_fsfreeze_mutex</span><span class="f">;</span>
<a name="469" /><span class="Maybe">     469:</span> <span class="f">}</span><span class="f">;</span>
<a name="470" /><span class="Maybe">     470:</span> 
<a name="471" /><span class="Maybe">     471:</span> <span class="k">/*</span>
<a name="472" /><span class="Maybe">     472:</span> <span class="k"> * Radix-tree tags, for tagging dirty and writeback pages within the pagecache</span>
<a name="473" /><span class="Maybe">     473:</span> <span class="k"> * radix trees</span>
<a name="474" /><span class="Maybe">     474:</span> <span class="k"> */</span>
<a name="475" /><span class="Maybe">     475:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEFHRUNBQ0hFX1RBR19ESVJUWV8w"><span class="b">PAGECACHE_TAG_DIRTY</span></a>    <span class="c">0</span>
<a name="476" /><span class="Maybe">     476:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEFHRUNBQ0hFX1RBR19XUklURUJBQ0tfMA__"><span class="b">PAGECACHE_TAG_WRITEBACK</span></a>    <span class="c">1</span>
<a name="477" /><span class="Maybe">     477:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_UEFHRUNBQ0hFX1RBR19UT1dSSVRFXzA_"><span class="b">PAGECACHE_TAG_TOWRITE</span></a>    <span class="c">2</span>
<a name="478" /><span class="Maybe">     478:</span> 
<a name="479" /><span class="Maybe">     479:</span> <span class="m">int</span> <span class="b">mapping_tagged</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span> <span class="m">int</span> <span class="b">tag</span><span class="f">)</span><span class="f">;</span>
<a name="480" /><span class="Maybe">     480:</span> 
<a name="481" /><span class="Maybe">     481:</span> <span class="k">/*</span>
<a name="482" /><span class="Maybe">     482:</span> <span class="k"> * Might pages of this file be mapped into userspace?</span>
<a name="483" /><span class="Maybe">     483:</span> <span class="k"> */</span>
<a name="484" /><span class="Maybe">     484:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">mapping_mapped</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span>
<a name="485" /><span class="Maybe">     485:</span> <span class="f">{</span>
<a name="486" /><span class="Maybe">     486:</span>     <span class="m">return</span>    <span class="f">!</span><a href="cpu.c_macros_ref.html#_UkJfRU1QVFlfUk9PVF8w"><span class="b">RB_EMPTY_ROOT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">mapping</span><span class="f">-&gt;</span><span class="b">i_mmap</span><span class="f">)</span> <span class="f">||</span>
<a name="487" /><span class="Maybe">     487:</span>         <span class="f">!</span><span class="b">list_empty</span><span class="f">(</span><span class="f">&amp;</span><span class="b">mapping</span><span class="f">-&gt;</span><span class="b">i_mmap_nonlinear</span><span class="f">)</span><span class="f">;</span>
<a name="488" /><span class="Maybe">     488:</span> <span class="f">}</span>
<a name="489" /><span class="Maybe">     489:</span> 
<a name="490" /><span class="Maybe">     490:</span> <span class="k">/*</span>
<a name="491" /><span class="Maybe">     491:</span> <span class="k"> * Might pages of this file have been modified in userspace?</span>
<a name="492" /><span class="Maybe">     492:</span> <span class="k"> * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff</span>
<a name="493" /><span class="Maybe">     493:</span> <span class="k"> * marks vma as VM_SHARED if it is shared, and the file was opened for</span>
<a name="494" /><span class="Maybe">     494:</span> <span class="k"> * writing i.e. vma may be mprotected writable even if now readonly.</span>
<a name="495" /><span class="Maybe">     495:</span> <span class="k"> */</span>
<a name="496" /><span class="Maybe">     496:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">mapping_writably_mapped</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span>
<a name="497" /><span class="Maybe">     497:</span> <span class="f">{</span>
<a name="498" /><span class="Maybe">     498:</span>     <span class="m">return</span> <span class="b">mapping</span><span class="f">-&gt;</span><span class="b">i_mmap_writable</span> <span class="f">!=</span> <span class="c">0</span><span class="f">;</span>
<a name="499" /><span class="Maybe">     499:</span> <span class="f">}</span>
<a name="500" /><span class="Maybe">     500:</span> 
<a name="501" /><span class="Maybe">     501:</span> <span class="k">/*</span>
<a name="502" /><span class="Maybe">     502:</span> <span class="k"> * Use sequence counter to get consistent i_size on 32-bit processors.</span>
<a name="503" /><span class="Maybe">     503:</span> <span class="k"> */</span>
<a name="504" /><span class="False">     504:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span>
<a name="505" /><span class="False">     505:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">seqlock</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="506" /><span class="False">     506:</span> <span class="f">#</span><span class="n">define</span> <span class="b">__NEED_I_SIZE_ORDERED</span>
<a name="507" /><span class="False">     507:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_aV9zaXplX29yZGVyZWRfaW5pdF8w"><span class="b">i_size_ordered_init</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_c2VxY291bnRfaW5pdF8w"><span class="b">seqcount_init</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size_seqcount</span><span class="f">)</span>
<a name="508" /><span class="Maybe">     508:</span> <span class="f">#</span><span class="n">else</span>
<a name="509" /><span class="Maybe">     509:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_aV9zaXplX29yZGVyZWRfaW5pdF8w"><span class="b">i_size_ordered_init</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span> <span class="m">do</span> <span class="f">{</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="510" /><span class="Maybe">     510:</span> <span class="f">#</span><span class="n">endif</span>
<a name="511" /><span class="Maybe">     511:</span> 
<a name="512" /><span class="Maybe">     512:</span> <span class="m">struct</span> <span class="b">posix_acl</span><span class="f">;</span>
<a name="513" /><span class="Maybe">     513:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QUNMX05PVF9DQUNIRURfMA__"><span class="b">ACL_NOT_CACHED</span></a> <span class="f">(</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">)</span>
<a name="514" /><span class="Maybe">     514:</span> 
<a name="515" /><span class="Maybe">     515:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU9QX0ZBU1RQRVJNXzA_"><span class="b">IOP_FASTPERM</span></a>    <span class="c">0x0001</span>
<a name="516" /><span class="Maybe">     516:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU9QX0xPT0tVUF8w"><span class="b">IOP_LOOKUP</span></a>    <span class="c">0x0002</span>
<a name="517" /><span class="Maybe">     517:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU9QX05PRk9MTE9XXzA_"><span class="b">IOP_NOFOLLOW</span></a>    <span class="c">0x0004</span>
<a name="518" /><span class="Maybe">     518:</span> 
<a name="519" /><span class="Maybe">     519:</span> <span class="k">/*</span>
<a name="520" /><span class="Maybe">     520:</span> <span class="k"> * Keep mostly read-only and often accessed (especially for</span>
<a name="521" /><span class="Maybe">     521:</span> <span class="k"> * the RCU path lookup and &apos;stat&apos; data) fields at the beginning</span>
<a name="522" /><span class="Maybe">     522:</span> <span class="k"> * of the &apos;struct inode&apos;</span>
<a name="523" /><span class="Maybe">     523:</span> <span class="k"> */</span>
<a name="524" /><span class="Maybe">     524:</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">{</span>
<a name="525" /><span class="Maybe">     525:</span>     <span class="b">umode_t</span>            <span class="b">i_mode</span><span class="f">;</span>
<a name="526" /><span class="Maybe">     526:</span>     <span class="m">unsigned</span> <span class="m">short</span>        <span class="b">i_opflags</span><span class="f">;</span>
<a name="527" /><span class="Maybe">     527:</span>     <span class="b">kuid_t</span>            <span class="b">i_uid</span><span class="f">;</span>
<a name="528" /><span class="Maybe">     528:</span>     <span class="b">kgid_t</span>            <span class="b">i_gid</span><span class="f">;</span>
<a name="529" /><span class="Maybe">     529:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">i_flags</span><span class="f">;</span>
<a name="530" /><span class="Maybe">     530:</span> 
<a name="531" /><span class="Maybe">     531:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZTX1BPU0lYX0FDTF8w"><span class="b">CONFIG_FS_POSIX_ACL</span></a>
<a name="532" /><span class="Maybe">     532:</span>     <span class="m">struct</span> <span class="b">posix_acl</span>    <span class="f">*</span><span class="b">i_acl</span><span class="f">;</span>
<a name="533" /><span class="Maybe">     533:</span>     <span class="m">struct</span> <span class="b">posix_acl</span>    <span class="f">*</span><span class="b">i_default_acl</span><span class="f">;</span>
<a name="534" /><span class="Maybe">     534:</span> <span class="f">#</span><span class="n">endif</span>
<a name="535" /><span class="Maybe">     535:</span> 
<a name="536" /><span class="Maybe">     536:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">inode_operations</span>    <span class="f">*</span><span class="b">i_op</span><span class="f">;</span>
<a name="537" /><span class="Maybe">     537:</span>     <span class="m">struct</span> <span class="b">super_block</span>    <span class="f">*</span><span class="b">i_sb</span><span class="f">;</span>
<a name="538" /><span class="Maybe">     538:</span>     <span class="m">struct</span> <span class="b">address_space</span>    <span class="f">*</span><span class="b">i_mapping</span><span class="f">;</span>
<a name="539" /><span class="Maybe">     539:</span> 
<a name="540" /><span class="Maybe">     540:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NFQ1VSSVRZXzA_"><span class="b">CONFIG_SECURITY</span></a>
<a name="541" /><span class="Maybe">     541:</span>     <span class="m">void</span>            <span class="f">*</span><span class="b">i_security</span><span class="f">;</span>
<a name="542" /><span class="Maybe">     542:</span> <span class="f">#</span><span class="n">endif</span>
<a name="543" /><span class="Maybe">     543:</span> 
<a name="544" /><span class="Maybe">     544:</span>     <span class="k">/* Stat data, not accessed from path walking */</span>
<a name="545" /><span class="Maybe">     545:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">i_ino</span><span class="f">;</span>
<a name="546" /><span class="Maybe">     546:</span>     <span class="k">/*</span>
<a name="547" /><span class="Maybe">     547:</span> <span class="k">     * Filesystems may only read i_nlink directly.  They shall use the</span>
<a name="548" /><span class="Maybe">     548:</span> <span class="k">     * following functions for modification:</span>
<a name="549" /><span class="Maybe">     549:</span> <span class="k">     *</span>
<a name="550" /><span class="Maybe">     550:</span> <span class="k">     *    (set|clear|inc|drop)_nlink</span>
<a name="551" /><span class="Maybe">     551:</span> <span class="k">     *    inode_(inc|dec)_link_count</span>
<a name="552" /><span class="Maybe">     552:</span> <span class="k">     */</span>
<a name="553" /><span class="Maybe">     553:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="554" /><span class="Maybe">     554:</span>         <span class="m">const</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">i_nlink</span><span class="f">;</span>
<a name="555" /><span class="Maybe">     555:</span>         <span class="m">unsigned</span> <span class="m">int</span> <span class="b">__i_nlink</span><span class="f">;</span>
<a name="556" /><span class="Maybe">     556:</span>     <span class="f">}</span><span class="f">;</span>
<a name="557" /><span class="Maybe">     557:</span>     <span class="b">dev_t</span>            <span class="b">i_rdev</span><span class="f">;</span>
<a name="558" /><span class="Maybe">     558:</span>     <span class="b">loff_t</span>            <span class="b">i_size</span><span class="f">;</span>
<a name="559" /><span class="Maybe">     559:</span>     <span class="m">struct</span> <span class="b">timespec</span>        <span class="b">i_atime</span><span class="f">;</span>
<a name="560" /><span class="Maybe">     560:</span>     <span class="m">struct</span> <span class="b">timespec</span>        <span class="b">i_mtime</span><span class="f">;</span>
<a name="561" /><span class="Maybe">     561:</span>     <span class="m">struct</span> <span class="b">timespec</span>        <span class="b">i_ctime</span><span class="f">;</span>
<a name="562" /><span class="Maybe">     562:</span>     <span class="b">spinlock_t</span>        <span class="b">i_lock</span><span class="f">;</span>    <span class="k">/* i_blocks, i_bytes, maybe i_size */</span>
<a name="563" /><span class="Maybe">     563:</span>     <span class="m">unsigned</span> <span class="m">short</span>          <span class="b">i_bytes</span><span class="f">;</span>
<a name="564" /><span class="Maybe">     564:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">i_blkbits</span><span class="f">;</span>
<a name="565" /><span class="Maybe">     565:</span>     <span class="b">blkcnt_t</span>        <span class="b">i_blocks</span><span class="f">;</span>
<a name="566" /><span class="Maybe">     566:</span> 
<a name="567" /><span class="False">     567:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">__NEED_I_SIZE_ORDERED</span>
<a name="568" /><span class="False">     568:</span>     <span class="b">seqcount_t</span>        <span class="b">i_size_seqcount</span><span class="f">;</span>
<a name="569" /><span class="Maybe">     569:</span> <span class="f">#</span><span class="n">endif</span>
<a name="570" /><span class="Maybe">     570:</span> 
<a name="571" /><span class="Maybe">     571:</span>     <span class="k">/* Misc */</span>
<a name="572" /><span class="Maybe">     572:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">i_state</span><span class="f">;</span>
<a name="573" /><span class="Maybe">     573:</span>     <span class="m">struct</span> <span class="b">mutex</span>        <span class="b">i_mutex</span><span class="f">;</span>
<a name="574" /><span class="Maybe">     574:</span> 
<a name="575" /><span class="Maybe">     575:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">dirtied_when</span><span class="f">;</span>    <span class="k">/* jiffies of first dirtying */</span>
<a name="576" /><span class="Maybe">     576:</span> 
<a name="577" /><span class="Maybe">     577:</span>     <span class="m">struct</span> <span class="b">hlist_node</span>    <span class="b">i_hash</span><span class="f">;</span>
<a name="578" /><span class="Maybe">     578:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">i_wb_list</span><span class="f">;</span>    <span class="k">/* backing dev IO list */</span>
<a name="579" /><span class="Maybe">     579:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">i_lru</span><span class="f">;</span>        <span class="k">/* inode LRU list */</span>
<a name="580" /><span class="Maybe">     580:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">i_sb_list</span><span class="f">;</span>
<a name="581" /><span class="Maybe">     581:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="582" /><span class="Maybe">     582:</span>         <span class="m">struct</span> <span class="b">hlist_head</span>    <span class="b">i_dentry</span><span class="f">;</span>
<a name="583" /><span class="Maybe">     583:</span>         <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a>        <span class="b">i_rcu</span><span class="f">;</span>
<a name="584" /><span class="Maybe">     584:</span>     <span class="f">}</span><span class="f">;</span>
<a name="585" /><span class="Maybe">     585:</span>     <span class="b">u64</span>            <span class="b">i_version</span><span class="f">;</span>
<a name="586" /><span class="Maybe">     586:</span>     <span class="b">atomic_t</span>        <span class="b">i_count</span><span class="f">;</span>
<a name="587" /><span class="Maybe">     587:</span>     <span class="b">atomic_t</span>        <span class="b">i_dio_count</span><span class="f">;</span>
<a name="588" /><span class="Maybe">     588:</span>     <span class="b">atomic_t</span>        <span class="b">i_writecount</span><span class="f">;</span>
<a name="589" /><span class="Maybe">     589:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span>    <span class="f">*</span><span class="b">i_fop</span><span class="f">;</span>    <span class="k">/* former -&gt;i_op-&gt;default_file_ops */</span>
<a name="590" /><span class="Maybe">     590:</span>     <span class="m">struct</span> <span class="b">file_lock</span>    <span class="f">*</span><span class="b">i_flock</span><span class="f">;</span>
<a name="591" /><span class="Maybe">     591:</span>     <span class="m">struct</span> <span class="b">address_space</span>    <span class="b">i_data</span><span class="f">;</span>
<a name="592" /><span class="Maybe">     592:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1FVT1RBXzA_"><span class="b">CONFIG_QUOTA</span></a>
<a name="593" /><span class="Maybe">     593:</span>     <span class="m">struct</span> <span class="b">dquot</span>        <span class="f">*</span><span class="b">i_dquot</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_TUFYUVVPVEFTXzA_"><span class="b">MAXQUOTAS</span></a><span class="f">]</span><span class="f">;</span>
<a name="594" /><span class="Maybe">     594:</span> <span class="f">#</span><span class="n">endif</span>
<a name="595" /><span class="Maybe">     595:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">i_devices</span><span class="f">;</span>
<a name="596" /><span class="Maybe">     596:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="597" /><span class="Maybe">     597:</span>         <span class="m">struct</span> <span class="b">pipe_inode_info</span>    <span class="f">*</span><span class="b">i_pipe</span><span class="f">;</span>
<a name="598" /><span class="Maybe">     598:</span>         <span class="m">struct</span> <span class="b">block_device</span>    <span class="f">*</span><span class="b">i_bdev</span><span class="f">;</span>
<a name="599" /><span class="Maybe">     599:</span>         <span class="m">struct</span> <span class="b">cdev</span>        <span class="f">*</span><span class="b">i_cdev</span><span class="f">;</span>
<a name="600" /><span class="Maybe">     600:</span>     <span class="f">}</span><span class="f">;</span>
<a name="601" /><span class="Maybe">     601:</span> 
<a name="602" /><span class="Maybe">     602:</span>     <span class="b">__u32</span>            <span class="b">i_generation</span><span class="f">;</span>
<a name="603" /><span class="Maybe">     603:</span> 
<a name="604" /><span class="Maybe">     604:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZTTk9USUZZXzA_"><span class="b">CONFIG_FSNOTIFY</span></a>
<a name="605" /><span class="Maybe">     605:</span>     <span class="b">__u32</span>            <span class="b">i_fsnotify_mask</span><span class="f">;</span> <span class="k">/* all events this inode cares about */</span>
<a name="606" /><span class="Maybe">     606:</span>     <span class="m">struct</span> <span class="b">hlist_head</span>    <span class="b">i_fsnotify_marks</span><span class="f">;</span>
<a name="607" /><span class="Maybe">     607:</span> <span class="f">#</span><span class="n">endif</span>
<a name="608" /><span class="Maybe">     608:</span> 
<a name="609" /><span class="Maybe">     609:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0lNQV8w"><span class="b">CONFIG_IMA</span></a>
<a name="610" /><span class="Maybe">     610:</span>     <span class="b">atomic_t</span>        <span class="b">i_readcount</span><span class="f">;</span> <span class="k">/* struct files open RO */</span>
<a name="611" /><span class="Maybe">     611:</span> <span class="f">#</span><span class="n">endif</span>
<a name="612" /><span class="Maybe">     612:</span>     <span class="m">void</span>            <span class="f">*</span><span class="b">i_private</span><span class="f">;</span> <span class="k">/* fs or device private pointer */</span>
<a name="613" /><span class="Maybe">     613:</span> <span class="f">}</span><span class="f">;</span>
<a name="614" /><span class="Maybe">     614:</span> 
<a name="615" /><span class="Maybe">     615:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">inode_unhashed</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="616" /><span class="Maybe">     616:</span> <span class="f">{</span>
<a name="617" /><span class="Maybe">     617:</span>     <span class="m">return</span> <span class="b">hlist_unhashed</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_hash</span><span class="f">)</span><span class="f">;</span>
<a name="618" /><span class="Maybe">     618:</span> <span class="f">}</span>
<a name="619" /><span class="Maybe">     619:</span> 
<a name="620" /><span class="Maybe">     620:</span> <span class="k">/*</span>
<a name="621" /><span class="Maybe">     621:</span> <span class="k"> * inode-&gt;i_mutex nesting subclasses for the lock validator:</span>
<a name="622" /><span class="Maybe">     622:</span> <span class="k"> *</span>
<a name="623" /><span class="Maybe">     623:</span> <span class="k"> * 0: the object of the current VFS operation</span>
<a name="624" /><span class="Maybe">     624:</span> <span class="k"> * 1: parent</span>
<a name="625" /><span class="Maybe">     625:</span> <span class="k"> * 2: child/target</span>
<a name="626" /><span class="Maybe">     626:</span> <span class="k"> * 3: xattr</span>
<a name="627" /><span class="Maybe">     627:</span> <span class="k"> * 4: second non-directory</span>
<a name="628" /><span class="Maybe">     628:</span> <span class="k"> * The last is for certain operations (such as rename) which lock two</span>
<a name="629" /><span class="Maybe">     629:</span> <span class="k"> * non-directories at once.</span>
<a name="630" /><span class="Maybe">     630:</span> <span class="k"> *</span>
<a name="631" /><span class="Maybe">     631:</span> <span class="k"> * The locking order between these classes is</span>
<a name="632" /><span class="Maybe">     632:</span> <span class="k"> * parent -&gt; child -&gt; normal -&gt; xattr -&gt; second non-directory</span>
<a name="633" /><span class="Maybe">     633:</span> <span class="k"> */</span>
<a name="634" /><span class="Maybe">     634:</span> <span class="m">enum</span> <span class="b">inode_i_mutex_lock_class</span>
<a name="635" /><span class="Maybe">     635:</span> <span class="f">{</span>
<a name="636" /><span class="Maybe">     636:</span>     <span class="b">I_MUTEX_NORMAL</span><span class="f">,</span>
<a name="637" /><span class="Maybe">     637:</span>     <span class="b">I_MUTEX_PARENT</span><span class="f">,</span>
<a name="638" /><span class="Maybe">     638:</span>     <span class="b">I_MUTEX_CHILD</span><span class="f">,</span>
<a name="639" /><span class="Maybe">     639:</span>     <span class="b">I_MUTEX_XATTR</span><span class="f">,</span>
<a name="640" /><span class="Maybe">     640:</span>     <span class="b">I_MUTEX_NONDIR2</span>
<a name="641" /><span class="Maybe">     641:</span> <span class="f">}</span><span class="f">;</span>
<a name="642" /><span class="Maybe">     642:</span> 
<a name="643" /><span class="Maybe">     643:</span> <span class="m">void</span> <span class="b">lock_two_nondirectories</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="644" /><span class="Maybe">     644:</span> <span class="m">void</span> <span class="b">unlock_two_nondirectories</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="645" /><span class="Maybe">     645:</span> 
<a name="646" /><span class="Maybe">     646:</span> <span class="k">/*</span>
<a name="647" /><span class="Maybe">     647:</span> <span class="k"> * NOTE: in a 32bit arch with a preemptable kernel and</span>
<a name="648" /><span class="Maybe">     648:</span> <span class="k"> * an UP compile the i_size_read/write must be atomic</span>
<a name="649" /><span class="Maybe">     649:</span> <span class="k"> * with respect to the local cpu (unlike with preempt disabled),</span>
<a name="650" /><span class="Maybe">     650:</span> <span class="k"> * but they don&apos;t need to be atomic with respect to other cpus like in</span>
<a name="651" /><span class="Maybe">     651:</span> <span class="k"> * true SMP (so they need either to either locally disable irq around</span>
<a name="652" /><span class="Maybe">     652:</span> <span class="k"> * the read or for example on x86 they can be still implemented as a</span>
<a name="653" /><span class="Maybe">     653:</span> <span class="k"> * cmpxchg8b without the need of the lock prefix). For SMP compiles</span>
<a name="654" /><span class="Maybe">     654:</span> <span class="k"> * and 64bit archs it makes no difference if preempt is enabled or not.</span>
<a name="655" /><span class="Maybe">     655:</span> <span class="k"> */</span>
<a name="656" /><span class="Maybe">     656:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">loff_t</span> <span class="b">i_size_read</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="657" /><span class="Maybe">     657:</span> <span class="f">{</span>
<a name="658" /><span class="False">     658:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span>
<a name="659" /><span class="False">     659:</span>     <span class="b">loff_t</span> <span class="b">i_size</span><span class="f">;</span>
<a name="660" /><span class="False">     660:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">seq</span><span class="f">;</span>
<a name="661" /><span class="False">     661:</span> 
<a name="662" /><span class="False">     662:</span>     <span class="m">do</span> <span class="f">{</span>
<a name="663" /><span class="False">     663:</span>         <span class="b">seq</span> <span class="f">=</span> <span class="b">read_seqcount_begin</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size_seqcount</span><span class="f">)</span><span class="f">;</span>
<a name="664" /><span class="False">     664:</span>         <span class="b">i_size</span> <span class="f">=</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span><span class="f">;</span>
<a name="665" /><span class="False">     665:</span>     <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="b">read_seqcount_retry</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size_seqcount</span><span class="f">,</span> <span class="b">seq</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="666" /><span class="False">     666:</span>     <span class="m">return</span> <span class="b">i_size</span><span class="f">;</span>
<a name="667" /><span class="False">     667:</span> <span class="f">#</span><span class="n">elif</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_PREEMPT</span><span class="f">)</span>
<a name="668" /><span class="False">     668:</span>     <span class="b">loff_t</span> <span class="b">i_size</span><span class="f">;</span>
<a name="669" /><span class="False">     669:</span> 
<a name="670" /><span class="False">     670:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9kaXNhYmxlXzA_"><span class="b">preempt_disable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="671" /><span class="False">     671:</span>     <span class="b">i_size</span> <span class="f">=</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span><span class="f">;</span>
<a name="672" /><span class="False">     672:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9lbmFibGVfMA__"><span class="b">preempt_enable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="673" /><span class="False">     673:</span>     <span class="m">return</span> <span class="b">i_size</span><span class="f">;</span>
<a name="674" /><span class="Maybe">     674:</span> <span class="f">#</span><span class="n">else</span>
<a name="675" /><span class="Maybe">     675:</span>     <span class="m">return</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span><span class="f">;</span>
<a name="676" /><span class="Maybe">     676:</span> <span class="f">#</span><span class="n">endif</span>
<a name="677" /><span class="Maybe">     677:</span> <span class="f">}</span>
<a name="678" /><span class="Maybe">     678:</span> 
<a name="679" /><span class="Maybe">     679:</span> <span class="k">/*</span>
<a name="680" /><span class="Maybe">     680:</span> <span class="k"> * NOTE: unlike i_size_read(), i_size_write() does need locking around it</span>
<a name="681" /><span class="Maybe">     681:</span> <span class="k"> * (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount</span>
<a name="682" /><span class="Maybe">     682:</span> <span class="k"> * can be lost, resulting in subsequent i_size_read() calls spinning forever.</span>
<a name="683" /><span class="Maybe">     683:</span> <span class="k"> */</span>
<a name="684" /><span class="Maybe">     684:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_size_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">i_size</span><span class="f">)</span>
<a name="685" /><span class="Maybe">     685:</span> <span class="f">{</span>
<a name="686" /><span class="False">     686:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_Q09ORklHX1NNUF8w"><span class="b">CONFIG_SMP</span></a><span class="f">)</span>
<a name="687" /><span class="False">     687:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9kaXNhYmxlXzA_"><span class="b">preempt_disable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="688" /><span class="False">     688:</span>     <span class="b">write_seqcount_begin</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size_seqcount</span><span class="f">)</span><span class="f">;</span>
<a name="689" /><span class="False">     689:</span>     <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">=</span> <span class="b">i_size</span><span class="f">;</span>
<a name="690" /><span class="False">     690:</span>     <span class="b">write_seqcount_end</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size_seqcount</span><span class="f">)</span><span class="f">;</span>
<a name="691" /><span class="False">     691:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9lbmFibGVfMA__"><span class="b">preempt_enable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="692" /><span class="False">     692:</span> <span class="f">#</span><span class="n">elif</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span> <span class="f">&amp;&amp;</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_PREEMPT</span><span class="f">)</span>
<a name="693" /><span class="False">     693:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9kaXNhYmxlXzA_"><span class="b">preempt_disable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="694" /><span class="False">     694:</span>     <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">=</span> <span class="b">i_size</span><span class="f">;</span>
<a name="695" /><span class="False">     695:</span>     <a href="cpu.c_macros_ref.html#_cHJlZW1wdF9lbmFibGVfMA__"><span class="b">preempt_enable</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="696" /><span class="Maybe">     696:</span> <span class="f">#</span><span class="n">else</span>
<a name="697" /><span class="Maybe">     697:</span>     <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">=</span> <span class="b">i_size</span><span class="f">;</span>
<a name="698" /><span class="Maybe">     698:</span> <span class="f">#</span><span class="n">endif</span>
<a name="699" /><span class="Maybe">     699:</span> <span class="f">}</span>
<a name="700" /><span class="Maybe">     700:</span> 
<a name="701" /><span class="Maybe">     701:</span> <span class="k">/* Helper functions so that in most cases filesystems will</span>
<a name="702" /><span class="Maybe">     702:</span> <span class="k"> * not need to deal directly with kuid_t and kgid_t and can</span>
<a name="703" /><span class="Maybe">     703:</span> <span class="k"> * instead deal with the raw numeric values that are stored</span>
<a name="704" /><span class="Maybe">     704:</span> <span class="k"> * in the filesystem.</span>
<a name="705" /><span class="Maybe">     705:</span> <span class="k"> */</span>
<a name="706" /><span class="Maybe">     706:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">uid_t</span> <span class="b">i_uid_read</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="707" /><span class="Maybe">     707:</span> <span class="f">{</span>
<a name="708" /><span class="Maybe">     708:</span>     <span class="m">return</span> <span class="b">from_kuid</span><span class="f">(</span><span class="f">&amp;</span><span class="b">init_user_ns</span><span class="f">,</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_uid</span><span class="f">)</span><span class="f">;</span>
<a name="709" /><span class="Maybe">     709:</span> <span class="f">}</span>
<a name="710" /><span class="Maybe">     710:</span> 
<a name="711" /><span class="Maybe">     711:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">gid_t</span> <span class="b">i_gid_read</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="712" /><span class="Maybe">     712:</span> <span class="f">{</span>
<a name="713" /><span class="Maybe">     713:</span>     <span class="m">return</span> <span class="b">from_kgid</span><span class="f">(</span><span class="f">&amp;</span><span class="b">init_user_ns</span><span class="f">,</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_gid</span><span class="f">)</span><span class="f">;</span>
<a name="714" /><span class="Maybe">     714:</span> <span class="f">}</span>
<a name="715" /><span class="Maybe">     715:</span> 
<a name="716" /><span class="Maybe">     716:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_uid_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">uid_t</span> <span class="b">uid</span><span class="f">)</span>
<a name="717" /><span class="Maybe">     717:</span> <span class="f">{</span>
<a name="718" /><span class="Maybe">     718:</span>     <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_uid</span> <span class="f">=</span> <span class="b">make_kuid</span><span class="f">(</span><span class="f">&amp;</span><span class="b">init_user_ns</span><span class="f">,</span> <span class="b">uid</span><span class="f">)</span><span class="f">;</span>
<a name="719" /><span class="Maybe">     719:</span> <span class="f">}</span>
<a name="720" /><span class="Maybe">     720:</span> 
<a name="721" /><span class="Maybe">     721:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_gid_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">gid_t</span> <span class="b">gid</span><span class="f">)</span>
<a name="722" /><span class="Maybe">     722:</span> <span class="f">{</span>
<a name="723" /><span class="Maybe">     723:</span>     <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_gid</span> <span class="f">=</span> <span class="b">make_kgid</span><span class="f">(</span><span class="f">&amp;</span><span class="b">init_user_ns</span><span class="f">,</span> <span class="b">gid</span><span class="f">)</span><span class="f">;</span>
<a name="724" /><span class="Maybe">     724:</span> <span class="f">}</span>
<a name="725" /><span class="Maybe">     725:</span> 
<a name="726" /><span class="Maybe">     726:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="b">iminor</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="727" /><span class="Maybe">     727:</span> <span class="f">{</span>
<a name="728" /><span class="Maybe">     728:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_TUlOT1JfMA__"><span class="b">MINOR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_rdev</span><span class="f">)</span><span class="f">;</span>
<a name="729" /><span class="Maybe">     729:</span> <span class="f">}</span>
<a name="730" /><span class="Maybe">     730:</span> 
<a name="731" /><span class="Maybe">     731:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">unsigned</span> <span class="b">imajor</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="732" /><span class="Maybe">     732:</span> <span class="f">{</span>
<a name="733" /><span class="Maybe">     733:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_TUFKT1JfMA__"><span class="b">MAJOR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_rdev</span><span class="f">)</span><span class="f">;</span>
<a name="734" /><span class="Maybe">     734:</span> <span class="f">}</span>
<a name="735" /><span class="Maybe">     735:</span> 
<a name="736" /><span class="Maybe">     736:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">I_BDEV</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="737" /><span class="Maybe">     737:</span> 
<a name="738" /><span class="Maybe">     738:</span> <span class="m">struct</span> <span class="b">fown_struct</span> <span class="f">{</span>
<a name="739" /><span class="Maybe">     739:</span>     <span class="b">rwlock_t</span> <span class="b">lock</span><span class="f">;</span>          <span class="k">/* protects pid, uid, euid fields */</span>
<a name="740" /><span class="Maybe">     740:</span>     <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">pid</span><span class="f">;</span>    <span class="k">/* pid or -pgrp where SIGIO should be sent */</span>
<a name="741" /><span class="Maybe">     741:</span>     <span class="m">enum</span> <span class="b">pid_type</span> <span class="b">pid_type</span><span class="f">;</span>    <span class="k">/* Kind of process group SIGIO should be sent to */</span>
<a name="742" /><span class="Maybe">     742:</span>     <span class="b">kuid_t</span> <span class="b">uid</span><span class="f">,</span> <span class="b">euid</span><span class="f">;</span>    <span class="k">/* uid/euid of process setting the owner */</span>
<a name="743" /><span class="Maybe">     743:</span>     <span class="m">int</span> <span class="b">signum</span><span class="f">;</span>        <span class="k">/* posix.1b rt signal to be delivered on IO */</span>
<a name="744" /><span class="Maybe">     744:</span> <span class="f">}</span><span class="f">;</span>
<a name="745" /><span class="Maybe">     745:</span> 
<a name="746" /><span class="Maybe">     746:</span> <span class="k">/*</span>
<a name="747" /><span class="Maybe">     747:</span> <span class="k"> * Track a single file&apos;s readahead state</span>
<a name="748" /><span class="Maybe">     748:</span> <span class="k"> */</span>
<a name="749" /><span class="Maybe">     749:</span> <span class="m">struct</span> <span class="b">file_ra_state</span> <span class="f">{</span>
<a name="750" /><span class="Maybe">     750:</span>     <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">start</span><span class="f">;</span>            <span class="k">/* where readahead started */</span>
<a name="751" /><span class="Maybe">     751:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">size</span><span class="f">;</span>        <span class="k">/* # of readahead pages */</span>
<a name="752" /><span class="Maybe">     752:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">async_size</span><span class="f">;</span>    <span class="k">/* do asynchronous readahead when</span>
<a name="753" /><span class="Maybe">     753:</span> <span class="k">                       there are only # of pages ahead */</span>
<a name="754" /><span class="Maybe">     754:</span> 
<a name="755" /><span class="Maybe">     755:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">ra_pages</span><span class="f">;</span>        <span class="k">/* Maximum readahead window */</span>
<a name="756" /><span class="Maybe">     756:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mmap_miss</span><span class="f">;</span>        <span class="k">/* Cache miss stat for mmap accesses */</span>
<a name="757" /><span class="Maybe">     757:</span>     <span class="b">loff_t</span> <span class="b">prev_pos</span><span class="f">;</span>        <span class="k">/* Cache last read() position */</span>
<a name="758" /><span class="Maybe">     758:</span> <span class="f">}</span><span class="f">;</span>
<a name="759" /><span class="Maybe">     759:</span> 
<a name="760" /><span class="Maybe">     760:</span> <span class="k">/*</span>
<a name="761" /><span class="Maybe">     761:</span> <span class="k"> * Check if @index falls in the readahead windows.</span>
<a name="762" /><span class="Maybe">     762:</span> <span class="k"> */</span>
<a name="763" /><span class="Maybe">     763:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">ra_has_index</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_ra_state</span> <span class="f">*</span><span class="b">ra</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">index</span><span class="f">)</span>
<a name="764" /><span class="Maybe">     764:</span> <span class="f">{</span>
<a name="765" /><span class="Maybe">     765:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">index</span> <span class="f">&gt;=</span> <span class="b">ra</span><span class="f">-&gt;</span><span class="b">start</span> <span class="f">&amp;&amp;</span>
<a name="766" /><span class="Maybe">     766:</span>         <span class="b">index</span> <span class="f">&lt;</span>  <span class="b">ra</span><span class="f">-&gt;</span><span class="b">start</span> <span class="f">+</span> <span class="b">ra</span><span class="f">-&gt;</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="767" /><span class="Maybe">     767:</span> <span class="f">}</span>
<a name="768" /><span class="Maybe">     768:</span> 
<a name="769" /><span class="Maybe">     769:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfVEFLRU5fMA__"><span class="b">FILE_MNT_WRITE_TAKEN</span></a>    <span class="c">1</span>
<a name="770" /><span class="Maybe">     770:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfUkVMRUFTRURfMA__"><span class="b">FILE_MNT_WRITE_RELEASED</span></a>    <span class="c">2</span>
<a name="771" /><span class="Maybe">     771:</span> 
<a name="772" /><span class="Maybe">     772:</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">{</span>
<a name="773" /><span class="Maybe">     773:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="774" /><span class="Maybe">     774:</span>         <span class="m">struct</span> <span class="b">llist_node</span>    <span class="b">fu_llist</span><span class="f">;</span>
<a name="775" /><span class="Maybe">     775:</span>         <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a>     <span class="b">fu_rcuhead</span><span class="f">;</span>
<a name="776" /><span class="Maybe">     776:</span>     <span class="f">}</span> <span class="b">f_u</span><span class="f">;</span>
<a name="777" /><span class="Maybe">     777:</span>     <span class="m">struct</span> <span class="b">path</span>        <span class="b">f_path</span><span class="f">;</span>
<a name="778" /><span class="Maybe">     778:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Zl9kZW50cnlfMA__"><span class="b">f_dentry</span></a>    <span class="b">f_path</span><span class="f">.</span><span class="b">dentry</span>
<a name="779" /><span class="Maybe">     779:</span>     <span class="m">struct</span> <span class="b">inode</span>        <span class="f">*</span><span class="b">f_inode</span><span class="f">;</span>    <span class="k">/* cached value */</span>
<a name="780" /><span class="Maybe">     780:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span>    <span class="f">*</span><span class="b">f_op</span><span class="f">;</span>
<a name="781" /><span class="Maybe">     781:</span> 
<a name="782" /><span class="Maybe">     782:</span>     <span class="k">/*</span>
<a name="783" /><span class="Maybe">     783:</span> <span class="k">     * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR.</span>
<a name="784" /><span class="Maybe">     784:</span> <span class="k">     * Must not be taken from IRQ context.</span>
<a name="785" /><span class="Maybe">     785:</span> <span class="k">     */</span>
<a name="786" /><span class="Maybe">     786:</span>     <span class="b">spinlock_t</span>        <span class="b">f_lock</span><span class="f">;</span>
<a name="787" /><span class="Maybe">     787:</span>     <span class="b">atomic_long_t</span>        <span class="b">f_count</span><span class="f">;</span>
<a name="788" /><span class="Maybe">     788:</span>     <span class="m">unsigned</span> <span class="m">int</span>         <span class="b">f_flags</span><span class="f">;</span>
<a name="789" /><span class="Maybe">     789:</span>     <span class="b">fmode_t</span>            <span class="b">f_mode</span><span class="f">;</span>
<a name="790" /><span class="Maybe">     790:</span>     <span class="b">loff_t</span>            <span class="b">f_pos</span><span class="f">;</span>
<a name="791" /><span class="Maybe">     791:</span>     <span class="m">struct</span> <span class="b">fown_struct</span>    <span class="b">f_owner</span><span class="f">;</span>
<a name="792" /><span class="Maybe">     792:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">cred</span>    <span class="f">*</span><span class="b">f_cred</span><span class="f">;</span>
<a name="793" /><span class="Maybe">     793:</span>     <span class="m">struct</span> <span class="b">file_ra_state</span>    <span class="b">f_ra</span><span class="f">;</span>
<a name="794" /><span class="Maybe">     794:</span> 
<a name="795" /><span class="Maybe">     795:</span>     <span class="b">u64</span>            <span class="b">f_version</span><span class="f">;</span>
<a name="796" /><span class="Maybe">     796:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NFQ1VSSVRZXzA_"><span class="b">CONFIG_SECURITY</span></a>
<a name="797" /><span class="Maybe">     797:</span>     <span class="m">void</span>            <span class="f">*</span><span class="b">f_security</span><span class="f">;</span>
<a name="798" /><span class="Maybe">     798:</span> <span class="f">#</span><span class="n">endif</span>
<a name="799" /><span class="Maybe">     799:</span>     <span class="k">/* needed for tty driver, and maybe others */</span>
<a name="800" /><span class="Maybe">     800:</span>     <span class="m">void</span>            <span class="f">*</span><span class="b">private_data</span><span class="f">;</span>
<a name="801" /><span class="Maybe">     801:</span> 
<a name="802" /><span class="Maybe">     802:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0VQT0xMXzA_"><span class="b">CONFIG_EPOLL</span></a>
<a name="803" /><span class="Maybe">     803:</span>     <span class="k">/* Used by fs/eventpoll.c to link all the hooks to this file */</span>
<a name="804" /><span class="Maybe">     804:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">f_ep_links</span><span class="f">;</span>
<a name="805" /><span class="Maybe">     805:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">f_tfile_llink</span><span class="f">;</span>
<a name="806" /><span class="Maybe">     806:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* #ifdef CONFIG_EPOLL */</span>
<a name="807" /><span class="Maybe">     807:</span>     <span class="m">struct</span> <span class="b">address_space</span>    <span class="f">*</span><span class="b">f_mapping</span><span class="f">;</span>
<a name="808" /><span class="False">     808:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_WRITECOUNT</span>
<a name="809" /><span class="False">     809:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">f_mnt_write_state</span><span class="f">;</span>
<a name="810" /><span class="Maybe">     810:</span> <span class="f">#</span><span class="n">endif</span>
<a name="811" /><span class="Maybe">     811:</span> <span class="f">}</span><span class="f">;</span>
<a name="812" /><span class="Maybe">     812:</span> 
<a name="813" /><span class="Maybe">     813:</span> <span class="m">struct</span> <span class="b">file_handle</span> <span class="f">{</span>
<a name="814" /><span class="Maybe">     814:</span>     <span class="b">__u32</span> <span class="b">handle_bytes</span><span class="f">;</span>
<a name="815" /><span class="Maybe">     815:</span>     <span class="m">int</span> <span class="b">handle_type</span><span class="f">;</span>
<a name="816" /><span class="Maybe">     816:</span>     <span class="k">/* file identifier */</span>
<a name="817" /><span class="Maybe">     817:</span>     <span class="m">unsigned</span> <span class="m">char</span> <span class="b">f_handle</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">;</span>
<a name="818" /><span class="Maybe">     818:</span> <span class="f">}</span><span class="f">;</span>
<a name="819" /><span class="Maybe">     819:</span> 
<a name="820" /><span class="Maybe">     820:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">get_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="821" /><span class="Maybe">     821:</span> <span class="f">{</span>
<a name="822" /><span class="Maybe">     822:</span>     <span class="b">atomic_long_inc</span><span class="f">(</span><span class="f">&amp;</span><span class="b">f</span><span class="f">-&gt;</span><span class="b">f_count</span><span class="f">)</span><span class="f">;</span>
<a name="823" /><span class="Maybe">     823:</span>     <span class="m">return</span> <span class="b">f</span><span class="f">;</span>
<a name="824" /><span class="Maybe">     824:</span> <span class="f">}</span>
<a name="825" /><span class="Maybe">     825:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZnB1dF9hdG9taWNfMA__"><span class="b">fput_atomic</span></a><span class="f">(</span><span class="b">x</span><span class="f">)</span>    <span class="b">atomic_long_add_unless</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">f_count</span><span class="f">,</span> <span class="f">-</span><span class="c">1</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span>
<a name="826" /><span class="Maybe">     826:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZmlsZV9jb3VudF8w"><span class="b">file_count</span></a><span class="f">(</span><span class="b">x</span><span class="f">)</span>    <span class="b">atomic_long_read</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">f_count</span><span class="f">)</span>
<a name="827" /><span class="Maybe">     827:</span> 
<a name="828" /><span class="False">     828:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_WRITECOUNT</span>
<a name="829" /><span class="False">     829:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_take_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="830" /><span class="False">     830:</span> <span class="f">{</span>
<a name="831" /><span class="False">     831:</span>     <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="832" /><span class="False">     832:</span>     <span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfVEFLRU5fMA__"><span class="b">FILE_MNT_WRITE_TAKEN</span></a><span class="f">;</span>
<a name="833" /><span class="False">     833:</span> <span class="f">}</span>
<a name="834" /><span class="False">     834:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_release_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="835" /><span class="False">     835:</span> <span class="f">{</span>
<a name="836" /><span class="False">     836:</span>     <span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">|=</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfUkVMRUFTRURfMA__"><span class="b">FILE_MNT_WRITE_RELEASED</span></a><span class="f">;</span>
<a name="837" /><span class="False">     837:</span> <span class="f">}</span>
<a name="838" /><span class="False">     838:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_reset_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="839" /><span class="False">     839:</span> <span class="f">{</span>
<a name="840" /><span class="False">     840:</span>     <span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="841" /><span class="False">     841:</span> <span class="f">}</span>
<a name="842" /><span class="False">     842:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_check_state</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="843" /><span class="False">     843:</span> <span class="f">{</span>
<a name="844" /><span class="False">     844:</span>     <span class="k">/*</span>
<a name="845" /><span class="False">     845:</span> <span class="k">     * At this point, either both or neither of these bits</span>
<a name="846" /><span class="False">     846:</span> <span class="k">     * should be set.</span>
<a name="847" /><span class="False">     847:</span> <span class="k">     */</span>
<a name="848" /><span class="False">     848:</span>     <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">==</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfVEFLRU5fMA__"><span class="b">FILE_MNT_WRITE_TAKEN</span></a><span class="f">)</span><span class="f">;</span>
<a name="849" /><span class="False">     849:</span>     <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">==</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfUkVMRUFTRURfMA__"><span class="b">FILE_MNT_WRITE_RELEASED</span></a><span class="f">)</span><span class="f">;</span>
<a name="850" /><span class="False">     850:</span> <span class="f">}</span>
<a name="851" /><span class="False">     851:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">file_check_writeable</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="852" /><span class="False">     852:</span> <span class="f">{</span>
<a name="853" /><span class="False">     853:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">f</span><span class="f">-&gt;</span><span class="b">f_mnt_write_state</span> <span class="f">==</span> <a href="cpu.c_macros_noref.html#_RklMRV9NTlRfV1JJVEVfVEFLRU5fMA__"><span class="b">FILE_MNT_WRITE_TAKEN</span></a><span class="f">)</span>
<a name="854" /><span class="False">     854:</span>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="855" /><span class="False">     855:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9XQVJOSU5HXzA_"><span class="b">KERN_WARNING</span></a> <span class="e">&quot;writeable file with no &quot;</span>
<a name="856" /><span class="False">     856:</span>                 <span class="e">&quot;mnt_want_write()\n&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="857" /><span class="False">     857:</span>     <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="858" /><span class="False">     858:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="859" /><span class="False">     859:</span> <span class="f">}</span>
<a name="860" /><span class="Maybe">     860:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_DEBUG_WRITECOUNT */</span>
<a name="861" /><span class="Maybe">     861:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_take_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="862" /><span class="Maybe">     862:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_release_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="863" /><span class="Maybe">     863:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_reset_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="864" /><span class="Maybe">     864:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_check_state</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="865" /><span class="Maybe">     865:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">file_check_writeable</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span>
<a name="866" /><span class="Maybe">     866:</span> <span class="f">{</span>
<a name="867" /><span class="Maybe">     867:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="868" /><span class="Maybe">     868:</span> <span class="f">}</span>
<a name="869" /><span class="Maybe">     869:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_DEBUG_WRITECOUNT */</span>
<a name="870" /><span class="Maybe">     870:</span> 
<a name="871" /><span class="Maybe">     871:</span> <span class="f">#</span><span class="n">define</span>    <a href="cpu.c_macros_noref.html#_TUFYX05PTl9MRlNfMA__"><span class="b">MAX_NON_LFS</span></a>    <span class="f">(</span><span class="f">(</span><span class="c">1UL</span><span class="f">&lt;&lt;</span><span class="c">31</span><span class="f">)</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span>
<a name="872" /><span class="Maybe">     872:</span> 
<a name="873" /><span class="Maybe">     873:</span> <span class="k">/* Page cache limit. The filesystems should put that into their s_maxbytes </span>
<a name="874" /><span class="Maybe">     874:</span> <span class="k">   limits, otherwise bad things can happen in VM. */</span> 
<a name="875" /><span class="False">     875:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">32</span>
<a name="876" /><span class="False">     876:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYX0xGU19GSUxFU0laRV8w"><span class="b">MAX_LFS_FILESIZE</span></a>    <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">loff_t</span><span class="f">)</span><span class="b">PAGE_CACHE_SIZE</span> <span class="f">&lt;&lt;</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">)</span><span class="f">-</span><span class="c">1</span><span class="f">)</span> 
<a name="877" /><span class="Maybe">     877:</span> <span class="f">#</span><span class="n">elif</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a><span class="f">==</span><span class="c">64</span>
<a name="878" /><span class="Maybe">     878:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYX0xGU19GSUxFU0laRV8w"><span class="b">MAX_LFS_FILESIZE</span></a>     <span class="f">(</span><span class="f">(</span><span class="b">loff_t</span><span class="f">)</span><span class="c">0x7fffffffffffffffLL</span><span class="f">)</span>
<a name="879" /><span class="Maybe">     879:</span> <span class="f">#</span><span class="n">endif</span>
<a name="880" /><span class="Maybe">     880:</span> 
<a name="881" /><span class="Maybe">     881:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfUE9TSVhfMA__"><span class="b">FL_POSIX</span></a>    <span class="c">1</span>
<a name="882" /><span class="Maybe">     882:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfRkxPQ0tfMA__"><span class="b">FL_FLOCK</span></a>    <span class="c">2</span>
<a name="883" /><span class="Maybe">     883:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_RkxfREVMRUdfMA__"><span class="b">FL_DELEG</span></a>    <span class="c">4</span>    <span class="k">/* NFSv4 delegation */</span>
<a name="884" /><span class="Maybe">     884:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfQUNDRVNTXzA_"><span class="b">FL_ACCESS</span></a>    <span class="c">8</span>    <span class="k">/* not trying to lock, just looking */</span>
<a name="885" /><span class="Maybe">     885:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfRVhJU1RTXzA_"><span class="b">FL_EXISTS</span></a>    <span class="c">16</span>    <span class="k">/* when unlocking, test for existence */</span>
<a name="886" /><span class="Maybe">     886:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_RkxfTEVBU0VfMA__"><span class="b">FL_LEASE</span></a>    <span class="c">32</span>    <span class="k">/* lease held on this file */</span>
<a name="887" /><span class="Maybe">     887:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfQ0xPU0VfMA__"><span class="b">FL_CLOSE</span></a>    <span class="c">64</span>    <span class="k">/* unlock on close */</span>
<a name="888" /><span class="Maybe">     888:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfU0xFRVBfMA__"><span class="b">FL_SLEEP</span></a>    <span class="c">128</span>    <span class="k">/* A blocking lock */</span>
<a name="889" /><span class="Maybe">     889:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfRE9XTkdSQURFX1BFTkRJTkdfMA__"><span class="b">FL_DOWNGRADE_PENDING</span></a>    <span class="c">256</span> <span class="k">/* Lease is being downgraded */</span>
<a name="890" /><span class="Maybe">     890:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxfVU5MT0NLX1BFTkRJTkdfMA__"><span class="b">FL_UNLOCK_PENDING</span></a>    <span class="c">512</span> <span class="k">/* Lease is being broken */</span>
<a name="891" /><span class="Maybe">     891:</span> 
<a name="892" /><span class="Maybe">     892:</span> <span class="k">/*</span>
<a name="893" /><span class="Maybe">     893:</span> <span class="k"> * Special return value from posix_lock_file() and vfs_lock_file() for</span>
<a name="894" /><span class="Maybe">     894:</span> <span class="k"> * asynchronous locking.</span>
<a name="895" /><span class="Maybe">     895:</span> <span class="k"> */</span>
<a name="896" /><span class="Maybe">     896:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RklMRV9MT0NLX0RFRkVSUkVEXzA_"><span class="b">FILE_LOCK_DEFERRED</span></a> <span class="c">1</span>
<a name="897" /><span class="Maybe">     897:</span> 
<a name="898" /><span class="Maybe">     898:</span> <span class="k">/*</span>
<a name="899" /><span class="Maybe">     899:</span> <span class="k"> * The POSIX file lock owner is determined by</span>
<a name="900" /><span class="Maybe">     900:</span> <span class="k"> * the &quot;struct files_struct&quot; in the thread group</span>
<a name="901" /><span class="Maybe">     901:</span> <span class="k"> * (or NULL for no owner - BSD locks).</span>
<a name="902" /><span class="Maybe">     902:</span> <span class="k"> *</span>
<a name="903" /><span class="Maybe">     903:</span> <span class="k"> * Lockd stuffs a &quot;host&quot; pointer into this.</span>
<a name="904" /><span class="Maybe">     904:</span> <span class="k"> */</span>
<a name="905" /><span class="Maybe">     905:</span> <span class="m">typedef</span> <span class="m">struct</span> <span class="b">files_struct</span> <span class="f">*</span><span class="b">fl_owner_t</span><span class="f">;</span>
<a name="906" /><span class="Maybe">     906:</span> 
<a name="907" /><span class="Maybe">     907:</span> <span class="m">struct</span> <span class="b">file_lock_operations</span> <span class="f">{</span>
<a name="908" /><span class="Maybe">     908:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">fl_copy_lock</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="909" /><span class="Maybe">     909:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">fl_release_private</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="910" /><span class="Maybe">     910:</span> <span class="f">}</span><span class="f">;</span>
<a name="911" /><span class="Maybe">     911:</span> 
<a name="912" /><span class="Maybe">     912:</span> <span class="m">struct</span> <span class="b">lock_manager_operations</span> <span class="f">{</span>
<a name="913" /><span class="Maybe">     913:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_compare_owner</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="914" /><span class="Maybe">     914:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_owner_key</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="915" /><span class="Maybe">     915:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_notify</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>    <span class="k">/* unblock callback */</span>
<a name="916" /><span class="Maybe">     916:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_grant</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="917" /><span class="Maybe">     917:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_break</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="918" /><span class="Maybe">     918:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">lm_change</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="919" /><span class="Maybe">     919:</span> <span class="f">}</span><span class="f">;</span>
<a name="920" /><span class="Maybe">     920:</span> 
<a name="921" /><span class="Maybe">     921:</span> <span class="m">struct</span> <span class="b">lock_manager</span> <span class="f">{</span>
<a name="922" /><span class="Maybe">     922:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">list</span><span class="f">;</span>
<a name="923" /><span class="Maybe">     923:</span> <span class="f">}</span><span class="f">;</span>
<a name="924" /><span class="Maybe">     924:</span> 
<a name="925" /><span class="Maybe">     925:</span> <span class="m">struct</span> <span class="b">net</span><span class="f">;</span>
<a name="926" /><span class="Maybe">     926:</span> <span class="m">void</span> <span class="b">locks_start_grace</span><span class="f">(</span><span class="m">struct</span> <span class="b">net</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">lock_manager</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="927" /><span class="Maybe">     927:</span> <span class="m">void</span> <span class="b">locks_end_grace</span><span class="f">(</span><span class="m">struct</span> <span class="b">lock_manager</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="928" /><span class="Maybe">     928:</span> <span class="m">int</span> <span class="b">locks_in_grace</span><span class="f">(</span><span class="m">struct</span> <span class="b">net</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="929" /><span class="Maybe">     929:</span> 
<a name="930" /><span class="Maybe">     930:</span> <span class="k">/* that will die - we need it for nfs_lock_info */</span>
<a name="931" /><span class="Maybe">     931:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">nfs_fs_i</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="932" /><span class="Maybe">     932:</span> 
<a name="933" /><span class="Maybe">     933:</span> <span class="k">/*</span>
<a name="934" /><span class="Maybe">     934:</span> <span class="k"> * struct file_lock represents a generic &quot;file lock&quot;. It&apos;s used to represent</span>
<a name="935" /><span class="Maybe">     935:</span> <span class="k"> * POSIX byte range locks, BSD (flock) locks, and leases. It&apos;s important to</span>
<a name="936" /><span class="Maybe">     936:</span> <span class="k"> * note that the same struct is used to represent both a request for a lock and</span>
<a name="937" /><span class="Maybe">     937:</span> <span class="k"> * the lock itself, but the same object is never used for both.</span>
<a name="938" /><span class="Maybe">     938:</span> <span class="k"> *</span>
<a name="939" /><span class="Maybe">     939:</span> <span class="k"> * FIXME: should we create a separate &quot;struct lock_request&quot; to help distinguish</span>
<a name="940" /><span class="Maybe">     940:</span> <span class="k"> * these two uses?</span>
<a name="941" /><span class="Maybe">     941:</span> <span class="k"> *</span>
<a name="942" /><span class="Maybe">     942:</span> <span class="k"> * The i_flock list is ordered by:</span>
<a name="943" /><span class="Maybe">     943:</span> <span class="k"> *</span>
<a name="944" /><span class="Maybe">     944:</span> <span class="k"> * 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX</span>
<a name="945" /><span class="Maybe">     945:</span> <span class="k"> * 2) lock owner</span>
<a name="946" /><span class="Maybe">     946:</span> <span class="k"> * 3) lock range start</span>
<a name="947" /><span class="Maybe">     947:</span> <span class="k"> * 4) lock range end</span>
<a name="948" /><span class="Maybe">     948:</span> <span class="k"> *</span>
<a name="949" /><span class="Maybe">     949:</span> <span class="k"> * Obviously, the last two criteria only matter for POSIX locks.</span>
<a name="950" /><span class="Maybe">     950:</span> <span class="k"> */</span>
<a name="951" /><span class="Maybe">     951:</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">{</span>
<a name="952" /><span class="Maybe">     952:</span>     <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl_next</span><span class="f">;</span>    <span class="k">/* singly linked list for this inode  */</span>
<a name="953" /><span class="Maybe">     953:</span>     <span class="m">struct</span> <span class="b">hlist_node</span> <span class="b">fl_link</span><span class="f">;</span>    <span class="k">/* node in global lists */</span>
<a name="954" /><span class="Maybe">     954:</span>     <span class="m">struct</span> <span class="b">list_head</span> <span class="b">fl_block</span><span class="f">;</span>    <span class="k">/* circular list of blocked processes */</span>
<a name="955" /><span class="Maybe">     955:</span>     <span class="b">fl_owner_t</span> <span class="b">fl_owner</span><span class="f">;</span>
<a name="956" /><span class="Maybe">     956:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fl_flags</span><span class="f">;</span>
<a name="957" /><span class="Maybe">     957:</span>     <span class="m">unsigned</span> <span class="m">char</span> <span class="b">fl_type</span><span class="f">;</span>
<a name="958" /><span class="Maybe">     958:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fl_pid</span><span class="f">;</span>
<a name="959" /><span class="Maybe">     959:</span>     <span class="m">int</span> <span class="b">fl_link_cpu</span><span class="f">;</span>        <span class="k">/* what cpu&apos;s list is this on? */</span>
<a name="960" /><span class="Maybe">     960:</span>     <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="b">fl_nspid</span><span class="f">;</span>
<a name="961" /><span class="Maybe">     961:</span>     <span class="b">wait_queue_head_t</span> <span class="b">fl_wait</span><span class="f">;</span>
<a name="962" /><span class="Maybe">     962:</span>     <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">fl_file</span><span class="f">;</span>
<a name="963" /><span class="Maybe">     963:</span>     <span class="b">loff_t</span> <span class="b">fl_start</span><span class="f">;</span>
<a name="964" /><span class="Maybe">     964:</span>     <span class="b">loff_t</span> <span class="b">fl_end</span><span class="f">;</span>
<a name="965" /><span class="Maybe">     965:</span> 
<a name="966" /><span class="Maybe">     966:</span>     <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span>    <span class="b">fl_fasync</span><span class="f">;</span> <span class="k">/* for lease break notifications */</span>
<a name="967" /><span class="Maybe">     967:</span>     <span class="k">/* for lease breaks: */</span>
<a name="968" /><span class="Maybe">     968:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">fl_break_time</span><span class="f">;</span>
<a name="969" /><span class="Maybe">     969:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">fl_downgrade_time</span><span class="f">;</span>
<a name="970" /><span class="Maybe">     970:</span> 
<a name="971" /><span class="Maybe">     971:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">file_lock_operations</span> <span class="f">*</span><span class="b">fl_ops</span><span class="f">;</span>    <span class="k">/* Callbacks for filesystems */</span>
<a name="972" /><span class="Maybe">     972:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">lock_manager_operations</span> <span class="f">*</span><span class="b">fl_lmops</span><span class="f">;</span>    <span class="k">/* Callbacks for lockmanagers */</span>
<a name="973" /><span class="Maybe">     973:</span>     <span class="m">union</span> <span class="f">{</span>
<a name="974" /><span class="Maybe">     974:</span>         <span class="m">struct</span> <span class="b">nfs_lock_info</span>    <span class="b">nfs_fl</span><span class="f">;</span>
<a name="975" /><span class="Maybe">     975:</span>         <span class="m">struct</span> <span class="b">nfs4_lock_info</span>    <span class="b">nfs4_fl</span><span class="f">;</span>
<a name="976" /><span class="Maybe">     976:</span>         <span class="m">struct</span> <span class="f">{</span>
<a name="977" /><span class="Maybe">     977:</span>             <span class="m">struct</span> <span class="b">list_head</span> <span class="b">link</span><span class="f">;</span>    <span class="k">/* link in AFS vnode&apos;s pending_locks list */</span>
<a name="978" /><span class="Maybe">     978:</span>             <span class="m">int</span> <span class="b">state</span><span class="f">;</span>        <span class="k">/* state of grant or error if -ve */</span>
<a name="979" /><span class="Maybe">     979:</span>         <span class="f">}</span> <span class="b">afs</span><span class="f">;</span>
<a name="980" /><span class="Maybe">     980:</span>     <span class="f">}</span> <span class="b">fl_u</span><span class="f">;</span>
<a name="981" /><span class="Maybe">     981:</span> <span class="f">}</span><span class="f">;</span>
<a name="982" /><span class="Maybe">     982:</span> 
<a name="983" /><span class="Maybe">     983:</span> <span class="k">/* The following constant reflects the upper bound of the file/locking space */</span>
<a name="984" /><span class="Maybe">     984:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_T0ZGU0VUX01BWF8w"><span class="b">OFFSET_MAX</span></a>
<a name="985" /><span class="Maybe">     985:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5UX0xJTUlUXzA_"><span class="b">INT_LIMIT</span></a><span class="f">(</span><span class="b">x</span><span class="f">)</span>    <span class="f">(</span><span class="f">~</span><span class="f">(</span><span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="f">*</span><span class="c">8</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="986" /><span class="Maybe">     986:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_T0ZGU0VUX01BWF8w"><span class="b">OFFSET_MAX</span></a>    <a href="cpu.c_macros_noref.html#_SU5UX0xJTUlUXzA_"><span class="b">INT_LIMIT</span></a><span class="f">(</span><span class="b">loff_t</span><span class="f">)</span>
<a name="987" /><span class="Maybe">     987:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_T0ZGVF9PRkZTRVRfTUFYXzA_"><span class="b">OFFT_OFFSET_MAX</span></a>    <a href="cpu.c_macros_noref.html#_SU5UX0xJTUlUXzA_"><span class="b">INT_LIMIT</span></a><span class="f">(</span><span class="b">off_t</span><span class="f">)</span>
<a name="988" /><span class="Maybe">     988:</span> <span class="f">#</span><span class="n">endif</span>
<a name="989" /><span class="Maybe">     989:</span> 
<a name="990" /><span class="Maybe">     990:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">fcntl</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="991" /><span class="Maybe">     991:</span> 
<a name="992" /><span class="Maybe">     992:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">send_sigio</span><span class="f">(</span><span class="m">struct</span> <span class="b">fown_struct</span> <span class="f">*</span><span class="b">fown</span><span class="f">,</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">int</span> <span class="b">band</span><span class="f">)</span><span class="f">;</span>
<a name="993" /><span class="Maybe">     993:</span> 
<a name="994" /><span class="Maybe">     994:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZJTEVfTE9DS0lOR18w"><span class="b">CONFIG_FILE_LOCKING</span></a>
<a name="995" /><span class="Maybe">     995:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_getlk</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="996" /><span class="Maybe">     996:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_setlk</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span>
<a name="997" /><span class="Maybe">     997:</span>             <span class="m">struct</span> <span class="b">flock</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="998" /><span class="Maybe">     998:</span> 
<a name="999" /><span class="False">     999:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a> <span class="f">==</span> <span class="c">32</span>
<a name="1000" /><span class="False">    1000:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_getlk64</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock64</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1001" /><span class="False">    1001:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_setlk64</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span>
<a name="1002" /><span class="False">    1002:</span>             <span class="m">struct</span> <span class="b">flock64</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1003" /><span class="Maybe">    1003:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1004" /><span class="Maybe">    1004:</span> 
<a name="1005" /><span class="Maybe">    1005:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_setlease</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">long</span> <span class="b">arg</span><span class="f">)</span><span class="f">;</span>
<a name="1006" /><span class="Maybe">    1006:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fcntl_getlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="1007" /><span class="Maybe">    1007:</span> 
<a name="1008" /><span class="Maybe">    1008:</span> <span class="k">/* fs/locks.c */</span>
<a name="1009" /><span class="Maybe">    1009:</span> <span class="m">void</span> <span class="b">locks_free_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span><span class="f">;</span>
<a name="1010" /><span class="Maybe">    1010:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">locks_init_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1011" /><span class="Maybe">    1011:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span> <span class="b">locks_alloc_lock</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1012" /><span class="Maybe">    1012:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">locks_copy_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1013" /><span class="Maybe">    1013:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__locks_copy_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1014" /><span class="Maybe">    1014:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">locks_remove_posix</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">fl_owner_t</span><span class="f">)</span><span class="f">;</span>
<a name="1015" /><span class="Maybe">    1015:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">locks_remove_flock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1016" /><span class="Maybe">    1016:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">locks_release_private</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1017" /><span class="Maybe">    1017:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">posix_test_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1018" /><span class="Maybe">    1018:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">posix_lock_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1019" /><span class="Maybe">    1019:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">posix_lock_file_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1020" /><span class="Maybe">    1020:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">posix_unblock_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1021" /><span class="Maybe">    1021:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_test_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1022" /><span class="Maybe">    1022:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_lock_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1023" /><span class="Maybe">    1023:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_cancel_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span><span class="f">;</span>
<a name="1024" /><span class="Maybe">    1024:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">flock_lock_file_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span><span class="f">;</span>
<a name="1025" /><span class="Maybe">    1025:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__break_lease</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">type</span><span class="f">)</span><span class="f">;</span>
<a name="1026" /><span class="Maybe">    1026:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">lease_get_mtime</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="f">*</span><span class="b">time</span><span class="f">)</span><span class="f">;</span>
<a name="1027" /><span class="Maybe">    1027:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_setlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">long</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1028" /><span class="Maybe">    1028:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_setlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">long</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1029" /><span class="Maybe">    1029:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lease_modify</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1030" /><span class="Maybe">    1030:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lock_may_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="1031" /><span class="Maybe">    1031:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">lock_may_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="1032" /><span class="False">    1032:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_FILE_LOCKING */</span>
<a name="1033" /><span class="False">    1033:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_getlk</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">user</span><span class="f">)</span>
<a name="1034" /><span class="False">    1034:</span> <span class="f">{</span>
<a name="1035" /><span class="False">    1035:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1036" /><span class="False">    1036:</span> <span class="f">}</span>
<a name="1037" /><span class="False">    1037:</span> 
<a name="1038" /><span class="False">    1038:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_setlk</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span>
<a name="1039" /><span class="False">    1039:</span>                   <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cmd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">user</span><span class="f">)</span>
<a name="1040" /><span class="False">    1040:</span> <span class="f">{</span>
<a name="1041" /><span class="False">    1041:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RUFDQ0VTXzA_"><span class="b">EACCES</span></a><span class="f">;</span>
<a name="1042" /><span class="False">    1042:</span> <span class="f">}</span>
<a name="1043" /><span class="False">    1043:</span> 
<a name="1044" /><span class="False">    1044:</span> <span class="f">#</span><span class="n">if</span> <a href="cpu.c_macros_ref.html#_QklUU19QRVJfTE9OR18w"><span class="b">BITS_PER_LONG</span></a> <span class="f">==</span> <span class="c">32</span>
<a name="1045" /><span class="False">    1045:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_getlk64</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock64</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">user</span><span class="f">)</span>
<a name="1046" /><span class="False">    1046:</span> <span class="f">{</span>
<a name="1047" /><span class="False">    1047:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1048" /><span class="False">    1048:</span> <span class="f">}</span>
<a name="1049" /><span class="False">    1049:</span> 
<a name="1050" /><span class="False">    1050:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_setlk64</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span>
<a name="1051" /><span class="False">    1051:</span>                 <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cmd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">flock64</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">user</span><span class="f">)</span>
<a name="1052" /><span class="False">    1052:</span> <span class="f">{</span>
<a name="1053" /><span class="False">    1053:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RUFDQ0VTXzA_"><span class="b">EACCES</span></a><span class="f">;</span>
<a name="1054" /><span class="False">    1054:</span> <span class="f">}</span>
<a name="1055" /><span class="False">    1055:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1056" /><span class="False">    1056:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_setlease</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">long</span> <span class="b">arg</span><span class="f">)</span>
<a name="1057" /><span class="False">    1057:</span> <span class="f">{</span>
<a name="1058" /><span class="False">    1058:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1059" /><span class="False">    1059:</span> <span class="f">}</span>
<a name="1060" /><span class="False">    1060:</span> 
<a name="1061" /><span class="False">    1061:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">fcntl_getlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span>
<a name="1062" /><span class="False">    1062:</span> <span class="f">{</span>
<a name="1063" /><span class="False">    1063:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1064" /><span class="False">    1064:</span> <span class="f">}</span>
<a name="1065" /><span class="False">    1065:</span> 
<a name="1066" /><span class="False">    1066:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">locks_init_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1067" /><span class="False">    1067:</span> <span class="f">{</span>
<a name="1068" /><span class="False">    1068:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1069" /><span class="False">    1069:</span> <span class="f">}</span>
<a name="1070" /><span class="False">    1070:</span> 
<a name="1071" /><span class="False">    1071:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">__locks_copy_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="m">new</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1072" /><span class="False">    1072:</span> <span class="f">{</span>
<a name="1073" /><span class="False">    1073:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1074" /><span class="False">    1074:</span> <span class="f">}</span>
<a name="1075" /><span class="False">    1075:</span> 
<a name="1076" /><span class="False">    1076:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">locks_copy_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="m">new</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1077" /><span class="False">    1077:</span> <span class="f">{</span>
<a name="1078" /><span class="False">    1078:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1079" /><span class="False">    1079:</span> <span class="f">}</span>
<a name="1080" /><span class="False">    1080:</span> 
<a name="1081" /><span class="False">    1081:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">locks_remove_posix</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="b">fl_owner_t</span> <span class="b">owner</span><span class="f">)</span>
<a name="1082" /><span class="False">    1082:</span> <span class="f">{</span>
<a name="1083" /><span class="False">    1083:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1084" /><span class="False">    1084:</span> <span class="f">}</span>
<a name="1085" /><span class="False">    1085:</span> 
<a name="1086" /><span class="False">    1086:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">locks_remove_flock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span>
<a name="1087" /><span class="False">    1087:</span> <span class="f">{</span>
<a name="1088" /><span class="False">    1088:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1089" /><span class="False">    1089:</span> <span class="f">}</span>
<a name="1090" /><span class="False">    1090:</span> 
<a name="1091" /><span class="False">    1091:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">posix_test_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1092" /><span class="False">    1092:</span> <span class="f">{</span>
<a name="1093" /><span class="False">    1093:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1094" /><span class="False">    1094:</span> <span class="f">}</span>
<a name="1095" /><span class="False">    1095:</span> 
<a name="1096" /><span class="False">    1096:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">posix_lock_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">,</span>
<a name="1097" /><span class="False">    1097:</span>                   <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">conflock</span><span class="f">)</span>
<a name="1098" /><span class="False">    1098:</span> <span class="f">{</span>
<a name="1099" /><span class="False">    1099:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RU5PTENLXzA_"><span class="b">ENOLCK</span></a><span class="f">;</span>
<a name="1100" /><span class="False">    1100:</span> <span class="f">}</span>
<a name="1101" /><span class="False">    1101:</span> 
<a name="1102" /><span class="False">    1102:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">posix_lock_file_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1103" /><span class="False">    1103:</span> <span class="f">{</span>
<a name="1104" /><span class="False">    1104:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RU5PTENLXzA_"><span class="b">ENOLCK</span></a><span class="f">;</span>
<a name="1105" /><span class="False">    1105:</span> <span class="f">}</span>
<a name="1106" /><span class="False">    1106:</span> 
<a name="1107" /><span class="False">    1107:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">posix_unblock_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">waiter</span><span class="f">)</span>
<a name="1108" /><span class="False">    1108:</span> <span class="f">{</span>
<a name="1109" /><span class="False">    1109:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RU5PRU5UXzA_"><span class="b">ENOENT</span></a><span class="f">;</span>
<a name="1110" /><span class="False">    1110:</span> <span class="f">}</span>
<a name="1111" /><span class="False">    1111:</span> 
<a name="1112" /><span class="False">    1112:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">vfs_test_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1113" /><span class="False">    1113:</span> <span class="f">{</span>
<a name="1114" /><span class="False">    1114:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1115" /><span class="False">    1115:</span> <span class="f">}</span>
<a name="1116" /><span class="False">    1116:</span> 
<a name="1117" /><span class="False">    1117:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">vfs_lock_file</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cmd</span><span class="f">,</span>
<a name="1118" /><span class="False">    1118:</span>                 <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">conf</span><span class="f">)</span>
<a name="1119" /><span class="False">    1119:</span> <span class="f">{</span>
<a name="1120" /><span class="False">    1120:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RU5PTENLXzA_"><span class="b">ENOLCK</span></a><span class="f">;</span>
<a name="1121" /><span class="False">    1121:</span> <span class="f">}</span>
<a name="1122" /><span class="False">    1122:</span> 
<a name="1123" /><span class="False">    1123:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">vfs_cancel_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">fl</span><span class="f">)</span>
<a name="1124" /><span class="False">    1124:</span> <span class="f">{</span>
<a name="1125" /><span class="False">    1125:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1126" /><span class="False">    1126:</span> <span class="f">}</span>
<a name="1127" /><span class="False">    1127:</span> 
<a name="1128" /><span class="False">    1128:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">flock_lock_file_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span>
<a name="1129" /><span class="False">    1129:</span>                        <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="b">request</span><span class="f">)</span>
<a name="1130" /><span class="False">    1130:</span> <span class="f">{</span>
<a name="1131" /><span class="False">    1131:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_noref.html#_RU5PTENLXzA_"><span class="b">ENOLCK</span></a><span class="f">;</span>
<a name="1132" /><span class="False">    1132:</span> <span class="f">}</span>
<a name="1133" /><span class="False">    1133:</span> 
<a name="1134" /><span class="False">    1134:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">__break_lease</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">type</span><span class="f">)</span>
<a name="1135" /><span class="False">    1135:</span> <span class="f">{</span>
<a name="1136" /><span class="False">    1136:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1137" /><span class="False">    1137:</span> <span class="f">}</span>
<a name="1138" /><span class="False">    1138:</span> 
<a name="1139" /><span class="False">    1139:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lease_get_mtime</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="f">*</span><span class="b">time</span><span class="f">)</span>
<a name="1140" /><span class="False">    1140:</span> <span class="f">{</span>
<a name="1141" /><span class="False">    1141:</span>     <span class="m">return</span><span class="f">;</span>
<a name="1142" /><span class="False">    1142:</span> <span class="f">}</span>
<a name="1143" /><span class="False">    1143:</span> 
<a name="1144" /><span class="False">    1144:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">generic_setlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">long</span> <span class="b">arg</span><span class="f">,</span>
<a name="1145" /><span class="False">    1145:</span>                     <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="b">flp</span><span class="f">)</span>
<a name="1146" /><span class="False">    1146:</span> <span class="f">{</span>
<a name="1147" /><span class="False">    1147:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1148" /><span class="False">    1148:</span> <span class="f">}</span>
<a name="1149" /><span class="False">    1149:</span> 
<a name="1150" /><span class="False">    1150:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">vfs_setlease</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">long</span> <span class="b">arg</span><span class="f">,</span>
<a name="1151" /><span class="False">    1151:</span>                    <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="b">lease</span><span class="f">)</span>
<a name="1152" /><span class="False">    1152:</span> <span class="f">{</span>
<a name="1153" /><span class="False">    1153:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1154" /><span class="False">    1154:</span> <span class="f">}</span>
<a name="1155" /><span class="False">    1155:</span> 
<a name="1156" /><span class="False">    1156:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">lease_modify</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="b">before</span><span class="f">,</span> <span class="m">int</span> <span class="b">arg</span><span class="f">)</span>
<a name="1157" /><span class="False">    1157:</span> <span class="f">{</span>
<a name="1158" /><span class="False">    1158:</span>     <span class="m">return</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RUlOVkFMXzA_"><span class="b">EINVAL</span></a><span class="f">;</span>
<a name="1159" /><span class="False">    1159:</span> <span class="f">}</span>
<a name="1160" /><span class="False">    1160:</span> 
<a name="1161" /><span class="False">    1161:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">lock_may_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span>
<a name="1162" /><span class="False">    1162:</span>                 <span class="m">unsigned</span> <span class="m">long</span> <span class="b">len</span><span class="f">)</span>
<a name="1163" /><span class="False">    1163:</span> <span class="f">{</span>
<a name="1164" /><span class="False">    1164:</span>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="1165" /><span class="False">    1165:</span> <span class="f">}</span>
<a name="1166" /><span class="False">    1166:</span> 
<a name="1167" /><span class="False">    1167:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">lock_may_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span>
<a name="1168" /><span class="False">    1168:</span>                  <span class="m">unsigned</span> <span class="m">long</span> <span class="b">len</span><span class="f">)</span>
<a name="1169" /><span class="False">    1169:</span> <span class="f">{</span>
<a name="1170" /><span class="False">    1170:</span>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="1171" /><span class="False">    1171:</span> <span class="f">}</span>
<a name="1172" /><span class="Maybe">    1172:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !CONFIG_FILE_LOCKING */</span>
<a name="1173" /><span class="Maybe">    1173:</span> 
<a name="1174" /><span class="Maybe">    1174:</span> 
<a name="1175" /><span class="Maybe">    1175:</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">{</span>
<a name="1176" /><span class="Maybe">    1176:</span>     <span class="b">spinlock_t</span>        <span class="b">fa_lock</span><span class="f">;</span>
<a name="1177" /><span class="Maybe">    1177:</span>     <span class="m">int</span>            <span class="b">magic</span><span class="f">;</span>
<a name="1178" /><span class="Maybe">    1178:</span>     <span class="m">int</span>            <span class="b">fa_fd</span><span class="f">;</span>
<a name="1179" /><span class="Maybe">    1179:</span>     <span class="m">struct</span> <span class="b">fasync_struct</span>    <span class="f">*</span><span class="b">fa_next</span><span class="f">;</span> <span class="k">/* singly linked list */</span>
<a name="1180" /><span class="Maybe">    1180:</span>     <span class="m">struct</span> <span class="b">file</span>        <span class="f">*</span><span class="b">fa_file</span><span class="f">;</span>
<a name="1181" /><span class="Maybe">    1181:</span>     <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a>        <span class="b">fa_rcu</span><span class="f">;</span>
<a name="1182" /><span class="Maybe">    1182:</span> <span class="f">}</span><span class="f">;</span>
<a name="1183" /><span class="Maybe">    1183:</span> 
<a name="1184" /><span class="Maybe">    1184:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkFTWU5DX01BR0lDXzA_"><span class="b">FASYNC_MAGIC</span></a> <span class="c">0x4601</span>
<a name="1185" /><span class="Maybe">    1185:</span> 
<a name="1186" /><span class="Maybe">    1186:</span> <span class="k">/* SMP safe fasync helpers: */</span>
<a name="1187" /><span class="Maybe">    1187:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fasync_helper</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1188" /><span class="Maybe">    1188:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="b">fasync_insert_entry</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1189" /><span class="Maybe">    1189:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fasync_remove_entry</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1190" /><span class="Maybe">    1190:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="b">fasync_alloc</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1191" /><span class="Maybe">    1191:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">fasync_free</span><span class="f">(</span><span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1192" /><span class="Maybe">    1192:</span> 
<a name="1193" /><span class="Maybe">    1193:</span> <span class="k">/* can be called from interrupts */</span>
<a name="1194" /><span class="Maybe">    1194:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">kill_fasync</span><span class="f">(</span><span class="m">struct</span> <span class="b">fasync_struct</span> <span class="f">*</span><span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1195" /><span class="Maybe">    1195:</span> 
<a name="1196" /><span class="Maybe">    1196:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__f_setown</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pid</span> <span class="f">*</span><span class="f">,</span> <span class="m">enum</span> <span class="b">pid_type</span><span class="f">,</span> <span class="m">int</span> <span class="b">force</span><span class="f">)</span><span class="f">;</span>
<a name="1197" /><span class="Maybe">    1197:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">f_setown</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">arg</span><span class="f">,</span> <span class="m">int</span> <span class="b">force</span><span class="f">)</span><span class="f">;</span>
<a name="1198" /><span class="Maybe">    1198:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">f_delown</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="1199" /><span class="Maybe">    1199:</span> <span class="m">extern</span> <span class="b">pid_t</span> <span class="b">f_getown</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="1200" /><span class="Maybe">    1200:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">send_sigurg</span><span class="f">(</span><span class="m">struct</span> <span class="b">fown_struct</span> <span class="f">*</span><span class="b">fown</span><span class="f">)</span><span class="f">;</span>
<a name="1201" /><span class="Maybe">    1201:</span> 
<a name="1202" /><span class="Maybe">    1202:</span> <span class="m">struct</span> <span class="b">mm_struct</span><span class="f">;</span>
<a name="1203" /><span class="Maybe">    1203:</span> 
<a name="1204" /><span class="Maybe">    1204:</span> <span class="k">/*</span>
<a name="1205" /><span class="Maybe">    1205:</span> <span class="k"> *    Umount options</span>
<a name="1206" /><span class="Maybe">    1206:</span> <span class="k"> */</span>
<a name="1207" /><span class="Maybe">    1207:</span> 
<a name="1208" /><span class="Maybe">    1208:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU5UX0ZPUkNFXzA_"><span class="b">MNT_FORCE</span></a>    <span class="c">0x00000001</span>    <span class="k">/* Attempt to forcibily umount */</span>
<a name="1209" /><span class="Maybe">    1209:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU5UX0RFVEFDSF8w"><span class="b">MNT_DETACH</span></a>    <span class="c">0x00000002</span>    <span class="k">/* Just detach from the tree */</span>
<a name="1210" /><span class="Maybe">    1210:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU5UX0VYUElSRV8w"><span class="b">MNT_EXPIRE</span></a>    <span class="c">0x00000004</span>    <span class="k">/* Mark for expiry */</span>
<a name="1211" /><span class="Maybe">    1211:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VU1PVU5UX05PRk9MTE9XXzA_"><span class="b">UMOUNT_NOFOLLOW</span></a>    <span class="c">0x00000008</span>    <span class="k">/* Don&apos;t follow symlink on umount */</span>
<a name="1212" /><span class="Maybe">    1212:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VU1PVU5UX1VOVVNFRF8w"><span class="b">UMOUNT_UNUSED</span></a>    <span class="c">0x80000000</span>    <span class="k">/* Flag guaranteed to be unused */</span>
<a name="1213" /><span class="Maybe">    1213:</span> 
<a name="1214" /><span class="Maybe">    1214:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">list_head</span> <span class="b">super_blocks</span><span class="f">;</span>
<a name="1215" /><span class="Maybe">    1215:</span> <span class="m">extern</span> <span class="b">spinlock_t</span> <span class="b">sb_lock</span><span class="f">;</span>
<a name="1216" /><span class="Maybe">    1216:</span> 
<a name="1217" /><span class="Maybe">    1217:</span> <span class="k">/* Possible states of &apos;frozen&apos; field */</span>
<a name="1218" /><span class="Maybe">    1218:</span> <span class="m">enum</span> <span class="f">{</span>
<a name="1219" /><span class="Maybe">    1219:</span>     <span class="b">SB_UNFROZEN</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span>        <span class="k">/* FS is unfrozen */</span>
<a name="1220" /><span class="Maybe">    1220:</span>     <span class="b">SB_FREEZE_WRITE</span>    <span class="f">=</span> <span class="c">1</span><span class="f">,</span>        <span class="k">/* Writes, dir ops, ioctls frozen */</span>
<a name="1221" /><span class="Maybe">    1221:</span>     <span class="b">SB_FREEZE_PAGEFAULT</span> <span class="f">=</span> <span class="c">2</span><span class="f">,</span>    <span class="k">/* Page faults stopped as well */</span>
<a name="1222" /><span class="Maybe">    1222:</span>     <span class="b">SB_FREEZE_FS</span> <span class="f">=</span> <span class="c">3</span><span class="f">,</span>        <span class="k">/* For internal FS use (e.g. to stop</span>
<a name="1223" /><span class="Maybe">    1223:</span> <span class="k">                     * internal threads if needed) */</span>
<a name="1224" /><span class="Maybe">    1224:</span>     <span class="b">SB_FREEZE_COMPLETE</span> <span class="f">=</span> <span class="c">4</span><span class="f">,</span>        <span class="k">/* -&gt;freeze_fs finished successfully */</span>
<a name="1225" /><span class="Maybe">    1225:</span> <span class="f">}</span><span class="f">;</span>
<a name="1226" /><span class="Maybe">    1226:</span> 
<a name="1227" /><span class="Maybe">    1227:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_U0JfRlJFRVpFX0xFVkVMU18w"><span class="b">SB_FREEZE_LEVELS</span></a> <span class="f">(</span><span class="b">SB_FREEZE_COMPLETE</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span>
<a name="1228" /><span class="Maybe">    1228:</span> 
<a name="1229" /><span class="Maybe">    1229:</span> <span class="m">struct</span> <span class="b">sb_writers</span> <span class="f">{</span>
<a name="1230" /><span class="Maybe">    1230:</span>     <span class="k">/* Counters for counting writers at each level */</span>
<a name="1231" /><span class="Maybe">    1231:</span>     <span class="m">struct</span> <span class="b">percpu_counter</span>    <span class="b">counter</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_U0JfRlJFRVpFX0xFVkVMU18w"><span class="b">SB_FREEZE_LEVELS</span></a><span class="f">]</span><span class="f">;</span>
<a name="1232" /><span class="Maybe">    1232:</span>     <span class="b">wait_queue_head_t</span>    <span class="b">wait</span><span class="f">;</span>        <span class="k">/* queue for waiting for</span>
<a name="1233" /><span class="Maybe">    1233:</span> <span class="k">                           writers / faults to finish */</span>
<a name="1234" /><span class="Maybe">    1234:</span>     <span class="m">int</span>            <span class="b">frozen</span><span class="f">;</span>        <span class="k">/* Is sb frozen? */</span>
<a name="1235" /><span class="Maybe">    1235:</span>     <span class="b">wait_queue_head_t</span>    <span class="b">wait_unfrozen</span><span class="f">;</span>    <span class="k">/* queue for waiting for</span>
<a name="1236" /><span class="Maybe">    1236:</span> <span class="k">                           sb to be thawed */</span>
<a name="1237" /><span class="False">    1237:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_LOCK_ALLOC</span>
<a name="1238" /><span class="False">    1238:</span>     <span class="m">struct</span> <span class="b">lockdep_map</span>    <span class="b">lock_map</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_U0JfRlJFRVpFX0xFVkVMU18w"><span class="b">SB_FREEZE_LEVELS</span></a><span class="f">]</span><span class="f">;</span>
<a name="1239" /><span class="Maybe">    1239:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1240" /><span class="Maybe">    1240:</span> <span class="f">}</span><span class="f">;</span>
<a name="1241" /><span class="Maybe">    1241:</span> 
<a name="1242" /><span class="Maybe">    1242:</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">{</span>
<a name="1243" /><span class="Maybe">    1243:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">s_list</span><span class="f">;</span>        <span class="k">/* Keep this first */</span>
<a name="1244" /><span class="Maybe">    1244:</span>     <span class="b">dev_t</span>            <span class="b">s_dev</span><span class="f">;</span>        <span class="k">/* search index; _not_ kdev_t */</span>
<a name="1245" /><span class="Maybe">    1245:</span>     <span class="m">unsigned</span> <span class="m">char</span>        <span class="b">s_blocksize_bits</span><span class="f">;</span>
<a name="1246" /><span class="Maybe">    1246:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">s_blocksize</span><span class="f">;</span>
<a name="1247" /><span class="Maybe">    1247:</span>     <span class="b">loff_t</span>            <span class="b">s_maxbytes</span><span class="f">;</span>    <span class="k">/* Max file size */</span>
<a name="1248" /><span class="Maybe">    1248:</span>     <span class="m">struct</span> <span class="b">file_system_type</span>    <span class="f">*</span><span class="b">s_type</span><span class="f">;</span>
<a name="1249" /><span class="Maybe">    1249:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">super_operations</span>    <span class="f">*</span><span class="b">s_op</span><span class="f">;</span>
<a name="1250" /><span class="Maybe">    1250:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">dquot_operations</span>    <span class="f">*</span><span class="b">dq_op</span><span class="f">;</span>
<a name="1251" /><span class="Maybe">    1251:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">quotactl_ops</span>    <span class="f">*</span><span class="b">s_qcop</span><span class="f">;</span>
<a name="1252" /><span class="Maybe">    1252:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">export_operations</span> <span class="f">*</span><span class="b">s_export_op</span><span class="f">;</span>
<a name="1253" /><span class="Maybe">    1253:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">s_flags</span><span class="f">;</span>
<a name="1254" /><span class="Maybe">    1254:</span>     <span class="m">unsigned</span> <span class="m">long</span>        <span class="b">s_magic</span><span class="f">;</span>
<a name="1255" /><span class="Maybe">    1255:</span>     <span class="m">struct</span> <span class="b">dentry</span>        <span class="f">*</span><span class="b">s_root</span><span class="f">;</span>
<a name="1256" /><span class="Maybe">    1256:</span>     <span class="m">struct</span> <span class="b">rw_semaphore</span>    <span class="b">s_umount</span><span class="f">;</span>
<a name="1257" /><span class="Maybe">    1257:</span>     <span class="m">int</span>            <span class="b">s_count</span><span class="f">;</span>
<a name="1258" /><span class="Maybe">    1258:</span>     <span class="b">atomic_t</span>        <span class="b">s_active</span><span class="f">;</span>
<a name="1259" /><span class="Maybe">    1259:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NFQ1VSSVRZXzA_"><span class="b">CONFIG_SECURITY</span></a>
<a name="1260" /><span class="Maybe">    1260:</span>     <span class="m">void</span>                    <span class="f">*</span><span class="b">s_security</span><span class="f">;</span>
<a name="1261" /><span class="Maybe">    1261:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1262" /><span class="Maybe">    1262:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">xattr_handler</span> <span class="f">*</span><span class="f">*</span><span class="b">s_xattr</span><span class="f">;</span>
<a name="1263" /><span class="Maybe">    1263:</span> 
<a name="1264" /><span class="Maybe">    1264:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">s_inodes</span><span class="f">;</span>    <span class="k">/* all inodes */</span>
<a name="1265" /><span class="Maybe">    1265:</span>     <span class="m">struct</span> <span class="b">hlist_bl_head</span>    <span class="b">s_anon</span><span class="f">;</span>        <span class="k">/* anonymous dentries for (nfs) exporting */</span>
<a name="1266" /><span class="Maybe">    1266:</span>     <span class="m">struct</span> <span class="b">list_head</span>    <span class="b">s_mounts</span><span class="f">;</span>    <span class="k">/* list of mounts; _not_ for fs use */</span>
<a name="1267" /><span class="Maybe">    1267:</span>     <span class="m">struct</span> <span class="b">block_device</span>    <span class="f">*</span><span class="b">s_bdev</span><span class="f">;</span>
<a name="1268" /><span class="Maybe">    1268:</span>     <span class="m">struct</span> <span class="b">backing_dev_info</span> <span class="f">*</span><span class="b">s_bdi</span><span class="f">;</span>
<a name="1269" /><span class="Maybe">    1269:</span>     <span class="m">struct</span> <span class="b">mtd_info</span>        <span class="f">*</span><span class="b">s_mtd</span><span class="f">;</span>
<a name="1270" /><span class="Maybe">    1270:</span>     <span class="m">struct</span> <span class="b">hlist_node</span>    <span class="b">s_instances</span><span class="f">;</span>
<a name="1271" /><span class="Maybe">    1271:</span>     <span class="m">struct</span> <span class="b">quota_info</span>    <span class="b">s_dquot</span><span class="f">;</span>    <span class="k">/* Diskquota specific options */</span>
<a name="1272" /><span class="Maybe">    1272:</span> 
<a name="1273" /><span class="Maybe">    1273:</span>     <span class="m">struct</span> <span class="b">sb_writers</span>    <span class="b">s_writers</span><span class="f">;</span>
<a name="1274" /><span class="Maybe">    1274:</span> 
<a name="1275" /><span class="Maybe">    1275:</span>     <span class="m">char</span> <span class="b">s_id</span><span class="f">[</span><span class="c">32</span><span class="f">]</span><span class="f">;</span>                <span class="k">/* Informational name */</span>
<a name="1276" /><span class="Maybe">    1276:</span>     <span class="b">u8</span> <span class="b">s_uuid</span><span class="f">[</span><span class="c">16</span><span class="f">]</span><span class="f">;</span>                <span class="k">/* UUID */</span>
<a name="1277" /><span class="Maybe">    1277:</span> 
<a name="1278" /><span class="Maybe">    1278:</span>     <span class="m">void</span>             <span class="f">*</span><span class="b">s_fs_info</span><span class="f">;</span>    <span class="k">/* Filesystem private info */</span>
<a name="1279" /><span class="Maybe">    1279:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">s_max_links</span><span class="f">;</span>
<a name="1280" /><span class="Maybe">    1280:</span>     <span class="b">fmode_t</span>            <span class="b">s_mode</span><span class="f">;</span>
<a name="1281" /><span class="Maybe">    1281:</span> 
<a name="1282" /><span class="Maybe">    1282:</span>     <span class="k">/* Granularity of c/m/atime in ns.</span>
<a name="1283" /><span class="Maybe">    1283:</span> <span class="k">       Cannot be worse than a second */</span>
<a name="1284" /><span class="Maybe">    1284:</span>     <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a>           <span class="b">s_time_gran</span><span class="f">;</span>
<a name="1285" /><span class="Maybe">    1285:</span> 
<a name="1286" /><span class="Maybe">    1286:</span>     <span class="k">/*</span>
<a name="1287" /><span class="Maybe">    1287:</span> <span class="k">     * The next field is for VFS *only*. No filesystems have any business</span>
<a name="1288" /><span class="Maybe">    1288:</span> <span class="k">     * even looking at it. You had been warned.</span>
<a name="1289" /><span class="Maybe">    1289:</span> <span class="k">     */</span>
<a name="1290" /><span class="Maybe">    1290:</span>     <span class="m">struct</span> <span class="b">mutex</span> <span class="b">s_vfs_rename_mutex</span><span class="f">;</span>    <span class="k">/* Kludge */</span>
<a name="1291" /><span class="Maybe">    1291:</span> 
<a name="1292" /><span class="Maybe">    1292:</span>     <span class="k">/*</span>
<a name="1293" /><span class="Maybe">    1293:</span> <span class="k">     * Filesystem subtype.  If non-empty the filesystem type field</span>
<a name="1294" /><span class="Maybe">    1294:</span> <span class="k">     * in /proc/mounts will be &quot;type.subtype&quot;</span>
<a name="1295" /><span class="Maybe">    1295:</span> <span class="k">     */</span>
<a name="1296" /><span class="Maybe">    1296:</span>     <span class="m">char</span> <span class="f">*</span><span class="b">s_subtype</span><span class="f">;</span>
<a name="1297" /><span class="Maybe">    1297:</span> 
<a name="1298" /><span class="Maybe">    1298:</span>     <span class="k">/*</span>
<a name="1299" /><span class="Maybe">    1299:</span> <span class="k">     * Saved mount options for lazy filesystems using</span>
<a name="1300" /><span class="Maybe">    1300:</span> <span class="k">     * generic_show_options()</span>
<a name="1301" /><span class="Maybe">    1301:</span> <span class="k">     */</span>
<a name="1302" /><span class="Maybe">    1302:</span>     <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X19yY3VfMA__"><span class="b">__rcu</span></a> <span class="f">*</span><span class="b">s_options</span><span class="f">;</span>
<a name="1303" /><span class="Maybe">    1303:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">dentry_operations</span> <span class="f">*</span><span class="b">s_d_op</span><span class="f">;</span> <span class="k">/* default d_op for dentries */</span>
<a name="1304" /><span class="Maybe">    1304:</span> 
<a name="1305" /><span class="Maybe">    1305:</span>     <span class="k">/*</span>
<a name="1306" /><span class="Maybe">    1306:</span> <span class="k">     * Saved pool identifier for cleancache (-1 means none)</span>
<a name="1307" /><span class="Maybe">    1307:</span> <span class="k">     */</span>
<a name="1308" /><span class="Maybe">    1308:</span>     <span class="m">int</span> <span class="b">cleancache_poolid</span><span class="f">;</span>
<a name="1309" /><span class="Maybe">    1309:</span> 
<a name="1310" /><span class="Maybe">    1310:</span>     <span class="m">struct</span> <span class="b">shrinker</span> <span class="b">s_shrink</span><span class="f">;</span>    <span class="k">/* per-sb shrinker handle */</span>
<a name="1311" /><span class="Maybe">    1311:</span> 
<a name="1312" /><span class="Maybe">    1312:</span>     <span class="k">/* Number of inodes with nlink == 0 but still referenced */</span>
<a name="1313" /><span class="Maybe">    1313:</span>     <span class="b">atomic_long_t</span> <span class="b">s_remove_count</span><span class="f">;</span>
<a name="1314" /><span class="Maybe">    1314:</span> 
<a name="1315" /><span class="Maybe">    1315:</span>     <span class="k">/* Being remounted read-only */</span>
<a name="1316" /><span class="Maybe">    1316:</span>     <span class="m">int</span> <span class="b">s_readonly_remount</span><span class="f">;</span>
<a name="1317" /><span class="Maybe">    1317:</span> 
<a name="1318" /><span class="Maybe">    1318:</span>     <span class="k">/* AIO completions deferred from interrupt context */</span>
<a name="1319" /><span class="Maybe">    1319:</span>     <span class="m">struct</span> <span class="b">workqueue_struct</span> <span class="f">*</span><span class="b">s_dio_done_wq</span><span class="f">;</span>
<a name="1320" /><span class="Maybe">    1320:</span> 
<a name="1321" /><span class="Maybe">    1321:</span>     <span class="k">/*</span>
<a name="1322" /><span class="Maybe">    1322:</span> <span class="k">     * Keep the lru lists last in the structure so they always sit on their</span>
<a name="1323" /><span class="Maybe">    1323:</span> <span class="k">     * own individual cachelines.</span>
<a name="1324" /><span class="Maybe">    1324:</span> <span class="k">     */</span>
<a name="1325" /><span class="Maybe">    1325:</span>     <span class="m">struct</span> <span class="b">list_lru</span>        <span class="b">s_dentry_lru</span> <a href="cpu.c_macros_ref.html#_X19fX2NhY2hlbGluZV9hbGlnbmVkX2luX3NtcF8w"><span class="b">____cacheline_aligned_in_smp</span></a><span class="f">;</span>
<a name="1326" /><span class="Maybe">    1326:</span>     <span class="m">struct</span> <span class="b">list_lru</span>        <span class="b">s_inode_lru</span> <a href="cpu.c_macros_ref.html#_X19fX2NhY2hlbGluZV9hbGlnbmVkX2luX3NtcF8w"><span class="b">____cacheline_aligned_in_smp</span></a><span class="f">;</span>
<a name="1327" /><span class="Maybe">    1327:</span>     <span class="m">struct</span> <a href="cpu.c_macros_ref.html#_cmN1X2hlYWRfMA__"><span class="b">rcu_head</span></a>        <span class="b">rcu</span><span class="f">;</span>
<a name="1328" /><span class="Maybe">    1328:</span> <span class="f">}</span><span class="f">;</span>
<a name="1329" /><span class="Maybe">    1329:</span> 
<a name="1330" /><span class="Maybe">    1330:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="b">current_fs_time</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1331" /><span class="Maybe">    1331:</span> 
<a name="1332" /><span class="Maybe">    1332:</span> <span class="k">/*</span>
<a name="1333" /><span class="Maybe">    1333:</span> <span class="k"> * Snapshotting support.</span>
<a name="1334" /><span class="Maybe">    1334:</span> <span class="k"> */</span>
<a name="1335" /><span class="Maybe">    1335:</span> 
<a name="1336" /><span class="Maybe">    1336:</span> <span class="m">void</span> <span class="b">__sb_end_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">int</span> <span class="b">level</span><span class="f">)</span><span class="f">;</span>
<a name="1337" /><span class="Maybe">    1337:</span> <span class="m">int</span> <span class="b">__sb_start_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">int</span> <span class="b">level</span><span class="f">,</span> <span class="m">bool</span> <span class="b">wait</span><span class="f">)</span><span class="f">;</span>
<a name="1338" /><span class="Maybe">    1338:</span> 
<a name="1339" /><span class="Maybe">    1339:</span> <span class="k">/**</span>
<a name="1340" /><span class="Maybe">    1340:</span> <span class="k"> * sb_end_write - drop write access to a superblock</span>
<a name="1341" /><span class="Maybe">    1341:</span> <span class="k"> * @sb: the super we wrote to</span>
<a name="1342" /><span class="Maybe">    1342:</span> <span class="k"> *</span>
<a name="1343" /><span class="Maybe">    1343:</span> <span class="k"> * Decrement number of writers to the filesystem. Wake up possible waiters</span>
<a name="1344" /><span class="Maybe">    1344:</span> <span class="k"> * wanting to freeze the filesystem.</span>
<a name="1345" /><span class="Maybe">    1345:</span> <span class="k"> */</span>
<a name="1346" /><span class="Maybe">    1346:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_end_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1347" /><span class="Maybe">    1347:</span> <span class="f">{</span>
<a name="1348" /><span class="Maybe">    1348:</span>     <span class="b">__sb_end_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">)</span><span class="f">;</span>
<a name="1349" /><span class="Maybe">    1349:</span> <span class="f">}</span>
<a name="1350" /><span class="Maybe">    1350:</span> 
<a name="1351" /><span class="Maybe">    1351:</span> <span class="k">/**</span>
<a name="1352" /><span class="Maybe">    1352:</span> <span class="k"> * sb_end_pagefault - drop write access to a superblock from a page fault</span>
<a name="1353" /><span class="Maybe">    1353:</span> <span class="k"> * @sb: the super we wrote to</span>
<a name="1354" /><span class="Maybe">    1354:</span> <span class="k"> *</span>
<a name="1355" /><span class="Maybe">    1355:</span> <span class="k"> * Decrement number of processes handling write page fault to the filesystem.</span>
<a name="1356" /><span class="Maybe">    1356:</span> <span class="k"> * Wake up possible waiters wanting to freeze the filesystem.</span>
<a name="1357" /><span class="Maybe">    1357:</span> <span class="k"> */</span>
<a name="1358" /><span class="Maybe">    1358:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_end_pagefault</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1359" /><span class="Maybe">    1359:</span> <span class="f">{</span>
<a name="1360" /><span class="Maybe">    1360:</span>     <span class="b">__sb_end_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_PAGEFAULT</span><span class="f">)</span><span class="f">;</span>
<a name="1361" /><span class="Maybe">    1361:</span> <span class="f">}</span>
<a name="1362" /><span class="Maybe">    1362:</span> 
<a name="1363" /><span class="Maybe">    1363:</span> <span class="k">/**</span>
<a name="1364" /><span class="Maybe">    1364:</span> <span class="k"> * sb_end_intwrite - drop write access to a superblock for internal fs purposes</span>
<a name="1365" /><span class="Maybe">    1365:</span> <span class="k"> * @sb: the super we wrote to</span>
<a name="1366" /><span class="Maybe">    1366:</span> <span class="k"> *</span>
<a name="1367" /><span class="Maybe">    1367:</span> <span class="k"> * Decrement fs-internal number of writers to the filesystem.  Wake up possible</span>
<a name="1368" /><span class="Maybe">    1368:</span> <span class="k"> * waiters wanting to freeze the filesystem.</span>
<a name="1369" /><span class="Maybe">    1369:</span> <span class="k"> */</span>
<a name="1370" /><span class="Maybe">    1370:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_end_intwrite</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1371" /><span class="Maybe">    1371:</span> <span class="f">{</span>
<a name="1372" /><span class="Maybe">    1372:</span>     <span class="b">__sb_end_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_FS</span><span class="f">)</span><span class="f">;</span>
<a name="1373" /><span class="Maybe">    1373:</span> <span class="f">}</span>
<a name="1374" /><span class="Maybe">    1374:</span> 
<a name="1375" /><span class="Maybe">    1375:</span> <span class="k">/**</span>
<a name="1376" /><span class="Maybe">    1376:</span> <span class="k"> * sb_start_write - get write access to a superblock</span>
<a name="1377" /><span class="Maybe">    1377:</span> <span class="k"> * @sb: the super we write to</span>
<a name="1378" /><span class="Maybe">    1378:</span> <span class="k"> *</span>
<a name="1379" /><span class="Maybe">    1379:</span> <span class="k"> * When a process wants to write data or metadata to a file system (i.e. dirty</span>
<a name="1380" /><span class="Maybe">    1380:</span> <span class="k"> * a page or an inode), it should embed the operation in a sb_start_write() -</span>
<a name="1381" /><span class="Maybe">    1381:</span> <span class="k"> * sb_end_write() pair to get exclusion against file system freezing. This</span>
<a name="1382" /><span class="Maybe">    1382:</span> <span class="k"> * function increments number of writers preventing freezing. If the file</span>
<a name="1383" /><span class="Maybe">    1383:</span> <span class="k"> * system is already frozen, the function waits until the file system is</span>
<a name="1384" /><span class="Maybe">    1384:</span> <span class="k"> * thawed.</span>
<a name="1385" /><span class="Maybe">    1385:</span> <span class="k"> *</span>
<a name="1386" /><span class="Maybe">    1386:</span> <span class="k"> * Since freeze protection behaves as a lock, users have to preserve</span>
<a name="1387" /><span class="Maybe">    1387:</span> <span class="k"> * ordering of freeze protection and other filesystem locks. Generally,</span>
<a name="1388" /><span class="Maybe">    1388:</span> <span class="k"> * freeze protection should be the outermost lock. In particular, we have:</span>
<a name="1389" /><span class="Maybe">    1389:</span> <span class="k"> *</span>
<a name="1390" /><span class="Maybe">    1390:</span> <span class="k"> * sb_start_write</span>
<a name="1391" /><span class="Maybe">    1391:</span> <span class="k"> *   -&gt; i_mutex            (write path, truncate, directory ops, ...)</span>
<a name="1392" /><span class="Maybe">    1392:</span> <span class="k"> *   -&gt; s_umount        (freeze_super, thaw_super)</span>
<a name="1393" /><span class="Maybe">    1393:</span> <span class="k"> */</span>
<a name="1394" /><span class="Maybe">    1394:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_start_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1395" /><span class="Maybe">    1395:</span> <span class="f">{</span>
<a name="1396" /><span class="Maybe">    1396:</span>     <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">,</span> <span class="m">true</span><span class="f">)</span><span class="f">;</span>
<a name="1397" /><span class="Maybe">    1397:</span> <span class="f">}</span>
<a name="1398" /><span class="Maybe">    1398:</span> 
<a name="1399" /><span class="Maybe">    1399:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sb_start_write_trylock</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1400" /><span class="Maybe">    1400:</span> <span class="f">{</span>
<a name="1401" /><span class="Maybe">    1401:</span>     <span class="m">return</span> <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">,</span> <span class="m">false</span><span class="f">)</span><span class="f">;</span>
<a name="1402" /><span class="Maybe">    1402:</span> <span class="f">}</span>
<a name="1403" /><span class="Maybe">    1403:</span> 
<a name="1404" /><span class="Maybe">    1404:</span> <span class="k">/**</span>
<a name="1405" /><span class="Maybe">    1405:</span> <span class="k"> * sb_start_pagefault - get write access to a superblock from a page fault</span>
<a name="1406" /><span class="Maybe">    1406:</span> <span class="k"> * @sb: the super we write to</span>
<a name="1407" /><span class="Maybe">    1407:</span> <span class="k"> *</span>
<a name="1408" /><span class="Maybe">    1408:</span> <span class="k"> * When a process starts handling write page fault, it should embed the</span>
<a name="1409" /><span class="Maybe">    1409:</span> <span class="k"> * operation into sb_start_pagefault() - sb_end_pagefault() pair to get</span>
<a name="1410" /><span class="Maybe">    1410:</span> <span class="k"> * exclusion against file system freezing. This is needed since the page fault</span>
<a name="1411" /><span class="Maybe">    1411:</span> <span class="k"> * is going to dirty a page. This function increments number of running page</span>
<a name="1412" /><span class="Maybe">    1412:</span> <span class="k"> * faults preventing freezing. If the file system is already frozen, the</span>
<a name="1413" /><span class="Maybe">    1413:</span> <span class="k"> * function waits until the file system is thawed.</span>
<a name="1414" /><span class="Maybe">    1414:</span> <span class="k"> *</span>
<a name="1415" /><span class="Maybe">    1415:</span> <span class="k"> * Since page fault freeze protection behaves as a lock, users have to preserve</span>
<a name="1416" /><span class="Maybe">    1416:</span> <span class="k"> * ordering of freeze protection and other filesystem locks. It is advised to</span>
<a name="1417" /><span class="Maybe">    1417:</span> <span class="k"> * put sb_start_pagefault() close to mmap_sem in lock ordering. Page fault</span>
<a name="1418" /><span class="Maybe">    1418:</span> <span class="k"> * handling code implies lock dependency:</span>
<a name="1419" /><span class="Maybe">    1419:</span> <span class="k"> *</span>
<a name="1420" /><span class="Maybe">    1420:</span> <span class="k"> * mmap_sem</span>
<a name="1421" /><span class="Maybe">    1421:</span> <span class="k"> *   -&gt; sb_start_pagefault</span>
<a name="1422" /><span class="Maybe">    1422:</span> <span class="k"> */</span>
<a name="1423" /><span class="Maybe">    1423:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_start_pagefault</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1424" /><span class="Maybe">    1424:</span> <span class="f">{</span>
<a name="1425" /><span class="Maybe">    1425:</span>     <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_PAGEFAULT</span><span class="f">,</span> <span class="m">true</span><span class="f">)</span><span class="f">;</span>
<a name="1426" /><span class="Maybe">    1426:</span> <span class="f">}</span>
<a name="1427" /><span class="Maybe">    1427:</span> 
<a name="1428" /><span class="Maybe">    1428:</span> <span class="k">/*</span>
<a name="1429" /><span class="Maybe">    1429:</span> <span class="k"> * sb_start_intwrite - get write access to a superblock for internal fs purposes</span>
<a name="1430" /><span class="Maybe">    1430:</span> <span class="k"> * @sb: the super we write to</span>
<a name="1431" /><span class="Maybe">    1431:</span> <span class="k"> *</span>
<a name="1432" /><span class="Maybe">    1432:</span> <span class="k"> * This is the third level of protection against filesystem freezing. It is</span>
<a name="1433" /><span class="Maybe">    1433:</span> <span class="k"> * free for use by a filesystem. The only requirement is that it must rank</span>
<a name="1434" /><span class="Maybe">    1434:</span> <span class="k"> * below sb_start_pagefault.</span>
<a name="1435" /><span class="Maybe">    1435:</span> <span class="k"> *</span>
<a name="1436" /><span class="Maybe">    1436:</span> <span class="k"> * For example filesystem can call sb_start_intwrite() when starting a</span>
<a name="1437" /><span class="Maybe">    1437:</span> <span class="k"> * transaction which somewhat eases handling of freezing for internal sources</span>
<a name="1438" /><span class="Maybe">    1438:</span> <span class="k"> * of filesystem changes (internal fs threads, discarding preallocation on file</span>
<a name="1439" /><span class="Maybe">    1439:</span> <span class="k"> * close, etc.).</span>
<a name="1440" /><span class="Maybe">    1440:</span> <span class="k"> */</span>
<a name="1441" /><span class="Maybe">    1441:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">sb_start_intwrite</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="1442" /><span class="Maybe">    1442:</span> <span class="f">{</span>
<a name="1443" /><span class="Maybe">    1443:</span>     <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">sb</span><span class="f">,</span> <span class="b">SB_FREEZE_FS</span><span class="f">,</span> <span class="m">true</span><span class="f">)</span><span class="f">;</span>
<a name="1444" /><span class="Maybe">    1444:</span> <span class="f">}</span>
<a name="1445" /><span class="Maybe">    1445:</span> 
<a name="1446" /><span class="Maybe">    1446:</span> 
<a name="1447" /><span class="Maybe">    1447:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">inode_owner_or_capable</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1448" /><span class="Maybe">    1448:</span> 
<a name="1449" /><span class="Maybe">    1449:</span> <span class="k">/*</span>
<a name="1450" /><span class="Maybe">    1450:</span> <span class="k"> * VFS helper functions..</span>
<a name="1451" /><span class="Maybe">    1451:</span> <span class="k"> */</span>
<a name="1452" /><span class="Maybe">    1452:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_create</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">,</span> <span class="m">bool</span><span class="f">)</span><span class="f">;</span>
<a name="1453" /><span class="Maybe">    1453:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_mkdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">)</span><span class="f">;</span>
<a name="1454" /><span class="Maybe">    1454:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_mknod</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">,</span> <span class="b">dev_t</span><span class="f">)</span><span class="f">;</span>
<a name="1455" /><span class="Maybe">    1455:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_symlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1456" /><span class="Maybe">    1456:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1457" /><span class="Maybe">    1457:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_rmdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1458" /><span class="Maybe">    1458:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_unlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1459" /><span class="Maybe">    1459:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_rename</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1460" /><span class="Maybe">    1460:</span> 
<a name="1461" /><span class="Maybe">    1461:</span> <span class="k">/*</span>
<a name="1462" /><span class="Maybe">    1462:</span> <span class="k"> * VFS dentry helper functions.</span>
<a name="1463" /><span class="Maybe">    1463:</span> <span class="k"> */</span>
<a name="1464" /><span class="Maybe">    1464:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">dentry_unhash</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">dentry</span><span class="f">)</span><span class="f">;</span>
<a name="1465" /><span class="Maybe">    1465:</span> 
<a name="1466" /><span class="Maybe">    1466:</span> <span class="k">/*</span>
<a name="1467" /><span class="Maybe">    1467:</span> <span class="k"> * VFS file helper functions.</span>
<a name="1468" /><span class="Maybe">    1468:</span> <span class="k"> */</span>
<a name="1469" /><span class="Maybe">    1469:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">inode_init_owner</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">dir</span><span class="f">,</span>
<a name="1470" /><span class="Maybe">    1470:</span>             <span class="b">umode_t</span> <span class="b">mode</span><span class="f">)</span><span class="f">;</span>
<a name="1471" /><span class="Maybe">    1471:</span> <span class="k">/*</span>
<a name="1472" /><span class="Maybe">    1472:</span> <span class="k"> * VFS FS_IOC_FIEMAP helper definitions.</span>
<a name="1473" /><span class="Maybe">    1473:</span> <span class="k"> */</span>
<a name="1474" /><span class="Maybe">    1474:</span> <span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">{</span>
<a name="1475" /><span class="Maybe">    1475:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fi_flags</span><span class="f">;</span>        <span class="k">/* Flags as passed from user */</span>
<a name="1476" /><span class="Maybe">    1476:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fi_extents_mapped</span><span class="f">;</span>    <span class="k">/* Number of mapped extents */</span>
<a name="1477" /><span class="Maybe">    1477:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fi_extents_max</span><span class="f">;</span>    <span class="k">/* Size of fiemap_extent array */</span>
<a name="1478" /><span class="Maybe">    1478:</span>     <span class="m">struct</span> <span class="b">fiemap_extent</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">fi_extents_start</span><span class="f">;</span> <span class="k">/* Start of</span>
<a name="1479" /><span class="Maybe">    1479:</span> <span class="k">                            fiemap_extent array */</span>
<a name="1480" /><span class="Maybe">    1480:</span> <span class="f">}</span><span class="f">;</span>
<a name="1481" /><span class="Maybe">    1481:</span> <span class="m">int</span> <span class="b">fiemap_fill_next_extent</span><span class="f">(</span><span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">*</span><span class="b">info</span><span class="f">,</span> <span class="b">u64</span> <span class="b">logical</span><span class="f">,</span>
<a name="1482" /><span class="Maybe">    1482:</span>                 <span class="b">u64</span> <span class="b">phys</span><span class="f">,</span> <span class="b">u64</span> <span class="b">len</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="1483" /><span class="Maybe">    1483:</span> <span class="m">int</span> <span class="b">fiemap_check_flags</span><span class="f">(</span><span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">*</span><span class="b">fieinfo</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_dTMyXzA_"><span class="b">u32</span></a> <span class="b">fs_flags</span><span class="f">)</span><span class="f">;</span>
<a name="1484" /><span class="Maybe">    1484:</span> 
<a name="1485" /><span class="Maybe">    1485:</span> <span class="k">/*</span>
<a name="1486" /><span class="Maybe">    1486:</span> <span class="k"> * File types</span>
<a name="1487" /><span class="Maybe">    1487:</span> <span class="k"> *</span>
<a name="1488" /><span class="Maybe">    1488:</span> <span class="k"> * NOTE! These match bits 12..15 of stat.st_mode</span>
<a name="1489" /><span class="Maybe">    1489:</span> <span class="k"> * (ie &quot;(i_mode &gt;&gt; 12) &amp; 15&quot;).</span>
<a name="1490" /><span class="Maybe">    1490:</span> <span class="k"> */</span>
<a name="1491" /><span class="Maybe">    1491:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfVU5LTk9XTl8w"><span class="b">DT_UNKNOWN</span></a>    <span class="c">0</span>
<a name="1492" /><span class="Maybe">    1492:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfRklGT18w"><span class="b">DT_FIFO</span></a>        <span class="c">1</span>
<a name="1493" /><span class="Maybe">    1493:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfQ0hSXzA_"><span class="b">DT_CHR</span></a>        <span class="c">2</span>
<a name="1494" /><span class="Maybe">    1494:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_RFRfRElSXzA_"><span class="b">DT_DIR</span></a>        <span class="c">4</span>
<a name="1495" /><span class="Maybe">    1495:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfQkxLXzA_"><span class="b">DT_BLK</span></a>        <span class="c">6</span>
<a name="1496" /><span class="Maybe">    1496:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfUkVHXzA_"><span class="b">DT_REG</span></a>        <span class="c">8</span>
<a name="1497" /><span class="Maybe">    1497:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfTE5LXzA_"><span class="b">DT_LNK</span></a>        <span class="c">10</span>
<a name="1498" /><span class="Maybe">    1498:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfU09DS18w"><span class="b">DT_SOCK</span></a>        <span class="c">12</span>
<a name="1499" /><span class="Maybe">    1499:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RFRfV0hUXzA_"><span class="b">DT_WHT</span></a>        <span class="c">14</span>
<a name="1500" /><span class="Maybe">    1500:</span> 
<a name="1501" /><span class="Maybe">    1501:</span> <span class="k">/*</span>
<a name="1502" /><span class="Maybe">    1502:</span> <span class="k"> * This is the &quot;filldir&quot; function type, used by readdir() to let</span>
<a name="1503" /><span class="Maybe">    1503:</span> <span class="k"> * the kernel specify what kind of dirent layout it wants to have.</span>
<a name="1504" /><span class="Maybe">    1504:</span> <span class="k"> * This allows the kernel to read directories into kernel space or</span>
<a name="1505" /><span class="Maybe">    1505:</span> <span class="k"> * to have different dirent layouts depending on the binary type.</span>
<a name="1506" /><span class="Maybe">    1506:</span> <span class="k"> */</span>
<a name="1507" /><span class="Maybe">    1507:</span> <span class="m">typedef</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">filldir_t</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">u64</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">)</span><span class="f">;</span>
<a name="1508" /><span class="Maybe">    1508:</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">{</span>
<a name="1509" /><span class="Maybe">    1509:</span>     <span class="m">const</span> <span class="b">filldir_t</span> <span class="b">actor</span><span class="f">;</span>
<a name="1510" /><span class="Maybe">    1510:</span>     <span class="b">loff_t</span> <span class="b">pos</span><span class="f">;</span>
<a name="1511" /><span class="Maybe">    1511:</span> <span class="f">}</span><span class="f">;</span>
<a name="1512" /><span class="Maybe">    1512:</span> 
<a name="1513" /><span class="Maybe">    1513:</span> <span class="m">struct</span> <span class="b">block_device_operations</span><span class="f">;</span>
<a name="1514" /><span class="Maybe">    1514:</span> 
<a name="1515" /><span class="Maybe">    1515:</span> <span class="k">/* These macros are for out of kernel modules to test that</span>
<a name="1516" /><span class="Maybe">    1516:</span> <span class="k"> * the kernel supports the unlocked_ioctl and compat_ioctl</span>
<a name="1517" /><span class="Maybe">    1517:</span> <span class="k"> * fields in struct file_operations. */</span>
<a name="1518" /><span class="Maybe">    1518:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SEFWRV9DT01QQVRfSU9DVExfMA__"><span class="b">HAVE_COMPAT_IOCTL</span></a> <span class="c">1</span>
<a name="1519" /><span class="Maybe">    1519:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SEFWRV9VTkxPQ0tFRF9JT0NUTF8w"><span class="b">HAVE_UNLOCKED_IOCTL</span></a> <span class="c">1</span>
<a name="1520" /><span class="Maybe">    1520:</span> 
<a name="1521" /><span class="Maybe">    1521:</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="f">{</span>
<a name="1522" /><span class="Maybe">    1522:</span>     <span class="m">struct</span> <span class="b">module</span> <span class="f">*</span><span class="b">owner</span><span class="f">;</span>
<a name="1523" /><span class="Maybe">    1523:</span>     <span class="b">loff_t</span> <span class="f">(</span><span class="f">*</span><span class="b">llseek</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1524" /><span class="Maybe">    1524:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">read</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1525" /><span class="Maybe">    1525:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">write</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1526" /><span class="Maybe">    1526:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">aio_read</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="1527" /><span class="Maybe">    1527:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">aio_write</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="1528" /><span class="Maybe">    1528:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">iterate</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1529" /><span class="Maybe">    1529:</span>     <span class="m">unsigned</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">poll</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">poll_table_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1530" /><span class="Maybe">    1530:</span>     <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">unlocked_ioctl</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="1531" /><span class="Maybe">    1531:</span>     <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">compat_ioctl</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="1532" /><span class="Maybe">    1532:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">mmap</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1533" /><span class="Maybe">    1533:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">open</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1534" /><span class="Maybe">    1534:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">flush</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">fl_owner_t</span> <span class="b">id</span><span class="f">)</span><span class="f">;</span>
<a name="1535" /><span class="Maybe">    1535:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">release</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1536" /><span class="Maybe">    1536:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fsync</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">int</span> <span class="b">datasync</span><span class="f">)</span><span class="f">;</span>
<a name="1537" /><span class="Maybe">    1537:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">aio_fsync</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <span class="b">datasync</span><span class="f">)</span><span class="f">;</span>
<a name="1538" /><span class="Maybe">    1538:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fasync</span><span class="f">)</span> <span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1539" /><span class="Maybe">    1539:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">lock</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1540" /><span class="Maybe">    1540:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">sendpage</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1541" /><span class="Maybe">    1541:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">get_unmapped_area</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="1542" /><span class="Maybe">    1542:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">check_flags</span><span class="f">)</span><span class="f">(</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1543" /><span class="Maybe">    1543:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">flock</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1544" /><span class="Maybe">    1544:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">splice_write</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1545" /><span class="Maybe">    1545:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">splice_read</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1546" /><span class="Maybe">    1546:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">setlease</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">long</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file_lock</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1547" /><span class="Maybe">    1547:</span>     <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">fallocate</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">int</span> <span class="b">mode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="1548" /><span class="Maybe">    1548:</span>               <span class="b">loff_t</span> <span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="1549" /><span class="Maybe">    1549:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">show_fdinfo</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="b">m</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span><span class="f">;</span>
<a name="1550" /><span class="Maybe">    1550:</span> <span class="f">}</span><span class="f">;</span>
<a name="1551" /><span class="Maybe">    1551:</span> 
<a name="1552" /><span class="Maybe">    1552:</span> <span class="m">struct</span> <span class="b">inode_operations</span> <span class="f">{</span>
<a name="1553" /><span class="Maybe">    1553:</span>     <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span> <span class="f">(</span><span class="f">*</span><span class="b">lookup</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1554" /><span class="Maybe">    1554:</span>     <span class="m">void</span> <span class="f">*</span> <span class="f">(</span><span class="f">*</span><span class="b">follow_link</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">nameidata</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1555" /><span class="Maybe">    1555:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">permission</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1556" /><span class="Maybe">    1556:</span>     <span class="m">struct</span> <span class="b">posix_acl</span> <span class="f">*</span> <span class="f">(</span><span class="f">*</span><span class="b">get_acl</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1557" /><span class="Maybe">    1557:</span> 
<a name="1558" /><span class="Maybe">    1558:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">readlink</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1559" /><span class="Maybe">    1559:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">put_link</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">nameidata</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1560" /><span class="Maybe">    1560:</span> 
<a name="1561" /><span class="Maybe">    1561:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">create</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">,</span> <span class="m">bool</span><span class="f">)</span><span class="f">;</span>
<a name="1562" /><span class="Maybe">    1562:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">link</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1563" /><span class="Maybe">    1563:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">unlink</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1564" /><span class="Maybe">    1564:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">symlink</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1565" /><span class="Maybe">    1565:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">mkdir</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span><span class="b">umode_t</span><span class="f">)</span><span class="f">;</span>
<a name="1566" /><span class="Maybe">    1566:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">rmdir</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1567" /><span class="Maybe">    1567:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">mknod</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span><span class="b">umode_t</span><span class="f">,</span><span class="b">dev_t</span><span class="f">)</span><span class="f">;</span>
<a name="1568" /><span class="Maybe">    1568:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">rename</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span>
<a name="1569" /><span class="Maybe">    1569:</span>             <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1570" /><span class="Maybe">    1570:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">setattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1571" /><span class="Maybe">    1571:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">getattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">mnt</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1572" /><span class="Maybe">    1572:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">setxattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span><span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span><span class="b">size_t</span><span class="f">,</span><span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1573" /><span class="Maybe">    1573:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">getxattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="1574" /><span class="Maybe">    1574:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">listxattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="1575" /><span class="Maybe">    1575:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">removexattr</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1576" /><span class="Maybe">    1576:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fiemap</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">*</span><span class="f">,</span> <span class="b">u64</span> <span class="b">start</span><span class="f">,</span>
<a name="1577" /><span class="Maybe">    1577:</span>               <span class="b">u64</span> <span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="1578" /><span class="Maybe">    1578:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">update_time</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">timespec</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1579" /><span class="Maybe">    1579:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">atomic_open</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span>
<a name="1580" /><span class="Maybe">    1580:</span>                <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">open_flag</span><span class="f">,</span>
<a name="1581" /><span class="Maybe">    1581:</span>                <span class="b">umode_t</span> <span class="b">create_mode</span><span class="f">,</span> <span class="m">int</span> <span class="f">*</span><span class="b">opened</span><span class="f">)</span><span class="f">;</span>
<a name="1582" /><span class="Maybe">    1582:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">tmpfile</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">)</span><span class="f">;</span>
<a name="1583" /><span class="Maybe">    1583:</span> <span class="f">}</span> <a href="cpu.c_macros_ref.html#_X19fX2NhY2hlbGluZV9hbGlnbmVkXzA_"><span class="b">____cacheline_aligned</span></a><span class="f">;</span>
<a name="1584" /><span class="Maybe">    1584:</span> 
<a name="1585" /><span class="Maybe">    1585:</span> <span class="b">ssize_t</span> <span class="b">rw_copy_check_uvector</span><span class="f">(</span><span class="m">int</span> <span class="b">type</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span> <span class="b">uvector</span><span class="f">,</span>
<a name="1586" /><span class="Maybe">    1586:</span>                   <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">fast_segs</span><span class="f">,</span>
<a name="1587" /><span class="Maybe">    1587:</span>                   <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">fast_pointer</span><span class="f">,</span>
<a name="1588" /><span class="Maybe">    1588:</span>                   <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">*</span><span class="b">ret_pointer</span><span class="f">)</span><span class="f">;</span>
<a name="1589" /><span class="Maybe">    1589:</span> 
<a name="1590" /><span class="Maybe">    1590:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">vfs_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1591" /><span class="Maybe">    1591:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">vfs_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1592" /><span class="Maybe">    1592:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">vfs_readv</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span>
<a name="1593" /><span class="Maybe">    1593:</span>         <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1594" /><span class="Maybe">    1594:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">vfs_writev</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span>
<a name="1595" /><span class="Maybe">    1595:</span>         <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1596" /><span class="Maybe">    1596:</span> 
<a name="1597" /><span class="Maybe">    1597:</span> <span class="m">struct</span> <span class="b">super_operations</span> <span class="f">{</span>
<a name="1598" /><span class="Maybe">    1598:</span>        <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">(</span><span class="f">*</span><span class="b">alloc_inode</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1599" /><span class="Maybe">    1599:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">destroy_inode</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1600" /><span class="Maybe">    1600:</span> 
<a name="1601" /><span class="Maybe">    1601:</span>        <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">dirty_inode</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="1602" /><span class="Maybe">    1602:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">write_inode</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">writeback_control</span> <span class="f">*</span><span class="b">wbc</span><span class="f">)</span><span class="f">;</span>
<a name="1603" /><span class="Maybe">    1603:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">drop_inode</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1604" /><span class="Maybe">    1604:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">evict_inode</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1605" /><span class="Maybe">    1605:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">put_super</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1606" /><span class="Maybe">    1606:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">sync_fs</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">int</span> <span class="b">wait</span><span class="f">)</span><span class="f">;</span>
<a name="1607" /><span class="Maybe">    1607:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">freeze_fs</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1608" /><span class="Maybe">    1608:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">unfreeze_fs</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1609" /><span class="Maybe">    1609:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">statfs</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1610" /><span class="Maybe">    1610:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">remount_fs</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1611" /><span class="Maybe">    1611:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">umount_begin</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1612" /><span class="Maybe">    1612:</span> 
<a name="1613" /><span class="Maybe">    1613:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">show_options</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1614" /><span class="Maybe">    1614:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">show_devname</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1615" /><span class="Maybe">    1615:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">show_path</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1616" /><span class="Maybe">    1616:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">show_stats</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1617" /><span class="Maybe">    1617:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1FVT1RBXzA_"><span class="b">CONFIG_QUOTA</span></a>
<a name="1618" /><span class="Maybe">    1618:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">quota_read</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="1619" /><span class="Maybe">    1619:</span>     <span class="b">ssize_t</span> <span class="f">(</span><span class="f">*</span><span class="b">quota_write</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="1620" /><span class="Maybe">    1620:</span> <span class="f">#</span><span class="n">endif</span>
<a name="1621" /><span class="Maybe">    1621:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">bdev_try_to_free_page</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span><span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span><span class="f">*</span><span class="f">,</span> <span class="b">gfp_t</span><span class="f">)</span><span class="f">;</span>
<a name="1622" /><span class="Maybe">    1622:</span>     <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">nr_cached_objects</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1623" /><span class="Maybe">    1623:</span>     <span class="m">long</span> <span class="f">(</span><span class="f">*</span><span class="b">free_cached_objects</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">long</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1624" /><span class="Maybe">    1624:</span> <span class="f">}</span><span class="f">;</span>
<a name="1625" /><span class="Maybe">    1625:</span> 
<a name="1626" /><span class="Maybe">    1626:</span> <span class="k">/*</span>
<a name="1627" /><span class="Maybe">    1627:</span> <span class="k"> * Inode flags - they have no relation to superblock flags now</span>
<a name="1628" /><span class="Maybe">    1628:</span> <span class="k"> */</span>
<a name="1629" /><span class="Maybe">    1629:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19TWU5DXzA_"><span class="b">S_SYNC</span></a>        <span class="c">1</span>    <span class="k">/* Writes are synced at once */</span>
<a name="1630" /><span class="Maybe">    1630:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19OT0FUSU1FXzA_"><span class="b">S_NOATIME</span></a>    <span class="c">2</span>    <span class="k">/* Do not update access times */</span>
<a name="1631" /><span class="Maybe">    1631:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19BUFBFTkRfMA__"><span class="b">S_APPEND</span></a>    <span class="c">4</span>    <span class="k">/* Append-only file */</span>
<a name="1632" /><span class="Maybe">    1632:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19JTU1VVEFCTEVfMA__"><span class="b">S_IMMUTABLE</span></a>    <span class="c">8</span>    <span class="k">/* Immutable file */</span>
<a name="1633" /><span class="Maybe">    1633:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_U19ERUFEXzA_"><span class="b">S_DEAD</span></a>        <span class="c">16</span>    <span class="k">/* removed, but still open directory */</span>
<a name="1634" /><span class="Maybe">    1634:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19OT1FVT1RBXzA_"><span class="b">S_NOQUOTA</span></a>    <span class="c">32</span>    <span class="k">/* Inode is not counted to quota */</span>
<a name="1635" /><span class="Maybe">    1635:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19ESVJTWU5DXzA_"><span class="b">S_DIRSYNC</span></a>    <span class="c">64</span>    <span class="k">/* Directory modifications are synchronous */</span>
<a name="1636" /><span class="Maybe">    1636:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19OT0NNVElNRV8w"><span class="b">S_NOCMTIME</span></a>    <span class="c">128</span>    <span class="k">/* Do not update file c/mtime */</span>
<a name="1637" /><span class="Maybe">    1637:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19TV0FQRklMRV8w"><span class="b">S_SWAPFILE</span></a>    <span class="c">256</span>    <span class="k">/* Do not truncate: swapon got its bmaps */</span>
<a name="1638" /><span class="Maybe">    1638:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19QUklWQVRFXzA_"><span class="b">S_PRIVATE</span></a>    <span class="c">512</span>    <span class="k">/* Inode is fs-internal */</span>
<a name="1639" /><span class="Maybe">    1639:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19JTUFfMA__"><span class="b">S_IMA</span></a>        <span class="c">1024</span>    <span class="k">/* Inode has an associated IMA struct */</span>
<a name="1640" /><span class="Maybe">    1640:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U19BVVRPTU9VTlRfMA__"><span class="b">S_AUTOMOUNT</span></a>    <span class="c">2048</span>    <span class="k">/* Automount/referral quasi-directory */</span>
<a name="1641" /><span class="Maybe">    1641:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_U19OT1NFQ18w"><span class="b">S_NOSEC</span></a>        <span class="c">4096</span>    <span class="k">/* no suid or xattr security attributes */</span>
<a name="1642" /><span class="Maybe">    1642:</span> 
<a name="1643" /><span class="Maybe">    1643:</span> <span class="k">/*</span>
<a name="1644" /><span class="Maybe">    1644:</span> <span class="k"> * Note that nosuid etc flags are inode-specific: setting some file-system</span>
<a name="1645" /><span class="Maybe">    1645:</span> <span class="k"> * flags just means all the inodes inherit those flags by default. It might be</span>
<a name="1646" /><span class="Maybe">    1646:</span> <span class="k"> * possible to override it selectively if you really wanted to with some</span>
<a name="1647" /><span class="Maybe">    1647:</span> <span class="k"> * ioctl() that is not currently implemented.</span>
<a name="1648" /><span class="Maybe">    1648:</span> <span class="k"> *</span>
<a name="1649" /><span class="Maybe">    1649:</span> <span class="k"> * Exception: MS_RDONLY is always applied to the entire file system.</span>
<a name="1650" /><span class="Maybe">    1650:</span> <span class="k"> *</span>
<a name="1651" /><span class="Maybe">    1651:</span> <span class="k"> * Unfortunately, it is possible to change a filesystems flags with it mounted</span>
<a name="1652" /><span class="Maybe">    1652:</span> <span class="k"> * with files in use.  This means that all of the inodes will not have their</span>
<a name="1653" /><span class="Maybe">    1653:</span> <span class="k"> * i_flags updated.  Hence, i_flags no longer inherit the superblock mount</span>
<a name="1654" /><span class="Maybe">    1654:</span> <span class="k"> * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org</span>
<a name="1655" /><span class="Maybe">    1655:</span> <span class="k"> */</span>
<a name="1656" /><span class="Maybe">    1656:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <span class="b">flg</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">-&gt;</span><span class="b">s_flags</span> <span class="f">&amp;</span> <span class="f">(</span><span class="b">flg</span><span class="f">)</span><span class="f">)</span>
<a name="1657" /><span class="Maybe">    1657:</span> 
<a name="1658" /><span class="Maybe">    1658:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfUkRPTkxZXzA_"><span class="b">IS_RDONLY</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">-&gt;</span><span class="b">s_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_TVNfUkRPTkxZXzA_"><span class="b">MS_RDONLY</span></a><span class="f">)</span>
<a name="1659" /><span class="Maybe">    1659:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfU1lOQ18w"><span class="b">IS_SYNC</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>        <span class="f">(</span><a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_TVNfU1lOQ0hST05PVVNfMA__"><span class="b">MS_SYNCHRONOUS</span></a><span class="f">)</span> <span class="f">||</span> \
<a name="1660" /><span class="Maybe">    1660:</span>                     <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19TWU5DXzA_"><span class="b">S_SYNC</span></a><span class="f">)</span><span class="f">)</span>
<a name="1661" /><span class="Maybe">    1661:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfRElSU1lOQ18w"><span class="b">IS_DIRSYNC</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_TVNfU1lOQ0hST05PVVNfMA__"><span class="b">MS_SYNCHRONOUS</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_TVNfRElSU1lOQ18w"><span class="b">MS_DIRSYNC</span></a><span class="f">)</span> <span class="f">||</span> \
<a name="1662" /><span class="Maybe">    1662:</span>                     <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_U19TWU5DXzA_"><span class="b">S_SYNC</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_U19ESVJTWU5DXzA_"><span class="b">S_DIRSYNC</span></a><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="1663" /><span class="Maybe">    1663:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SVNfTUFORExPQ0tfMA__"><span class="b">IS_MANDLOCK</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TVNfTUFORExPQ0tfMA__"><span class="b">MS_MANDLOCK</span></a><span class="f">)</span>
<a name="1664" /><span class="Maybe">    1664:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfTk9BVElNRV8w"><span class="b">IS_NOATIME</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_TVNfUkRPTkxZXzA_"><span class="b">MS_RDONLY</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_TVNfTk9BVElNRV8w"><span class="b">MS_NOATIME</span></a><span class="f">)</span>
<a name="1665" /><span class="Maybe">    1665:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfSV9WRVJTSU9OXzA_"><span class="b">IS_I_VERSION</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_TVNfSV9WRVJTSU9OXzA_"><span class="b">MS_I_VERSION</span></a><span class="f">)</span>
<a name="1666" /><span class="Maybe">    1666:</span> 
<a name="1667" /><span class="Maybe">    1667:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfTk9RVU9UQV8w"><span class="b">IS_NOQUOTA</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19OT1FVT1RBXzA_"><span class="b">S_NOQUOTA</span></a><span class="f">)</span>
<a name="1668" /><span class="Maybe">    1668:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfQVBQRU5EXzA_"><span class="b">IS_APPEND</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19BUFBFTkRfMA__"><span class="b">S_APPEND</span></a><span class="f">)</span>
<a name="1669" /><span class="Maybe">    1669:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfSU1NVVRBQkxFXzA_"><span class="b">IS_IMMUTABLE</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19JTU1VVEFCTEVfMA__"><span class="b">S_IMMUTABLE</span></a><span class="f">)</span>
<a name="1670" /><span class="Maybe">    1670:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfUE9TSVhBQ0xfMA__"><span class="b">IS_POSIXACL</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <a href="cpu.c_macros_ref.html#_X19JU19GTEdfMA__"><span class="b">__IS_FLG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_noref.html#_TVNfUE9TSVhBQ0xfMA__"><span class="b">MS_POSIXACL</span></a><span class="f">)</span>
<a name="1671" /><span class="Maybe">    1671:</span> 
<a name="1672" /><span class="Maybe">    1672:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SVNfREVBRERJUl8w"><span class="b">IS_DEADDIR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19ERUFEXzA_"><span class="b">S_DEAD</span></a><span class="f">)</span>
<a name="1673" /><span class="Maybe">    1673:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfTk9DTVRJTUVfMA__"><span class="b">IS_NOCMTIME</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19OT0NNVElNRV8w"><span class="b">S_NOCMTIME</span></a><span class="f">)</span>
<a name="1674" /><span class="Maybe">    1674:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfU1dBUEZJTEVfMA__"><span class="b">IS_SWAPFILE</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19TV0FQRklMRV8w"><span class="b">S_SWAPFILE</span></a><span class="f">)</span>
<a name="1675" /><span class="Maybe">    1675:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfUFJJVkFURV8w"><span class="b">IS_PRIVATE</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19QUklWQVRFXzA_"><span class="b">S_PRIVATE</span></a><span class="f">)</span>
<a name="1676" /><span class="Maybe">    1676:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfSU1BXzA_"><span class="b">IS_IMA</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>        <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19JTUFfMA__"><span class="b">S_IMA</span></a><span class="f">)</span>
<a name="1677" /><span class="Maybe">    1677:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfQVVUT01PVU5UXzA_"><span class="b">IS_AUTOMOUNT</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_U19BVVRPTU9VTlRfMA__"><span class="b">S_AUTOMOUNT</span></a><span class="f">)</span>
<a name="1678" /><span class="Maybe">    1678:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SVNfTk9TRUNfMA__"><span class="b">IS_NOSEC</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span>        <span class="f">(</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19OT1NFQ18w"><span class="b">S_NOSEC</span></a><span class="f">)</span>
<a name="1679" /><span class="Maybe">    1679:</span> 
<a name="1680" /><span class="Maybe">    1680:</span> <span class="k">/*</span>
<a name="1681" /><span class="Maybe">    1681:</span> <span class="k"> * Inode state bits.  Protected by inode-&gt;i_lock</span>
<a name="1682" /><span class="Maybe">    1682:</span> <span class="k"> *</span>
<a name="1683" /><span class="Maybe">    1683:</span> <span class="k"> * Three bits determine the dirty state of the inode, I_DIRTY_SYNC,</span>
<a name="1684" /><span class="Maybe">    1684:</span> <span class="k"> * I_DIRTY_DATASYNC and I_DIRTY_PAGES.</span>
<a name="1685" /><span class="Maybe">    1685:</span> <span class="k"> *</span>
<a name="1686" /><span class="Maybe">    1686:</span> <span class="k"> * Four bits define the lifetime of an inode.  Initially, inodes are I_NEW,</span>
<a name="1687" /><span class="Maybe">    1687:</span> <span class="k"> * until that flag is cleared.  I_WILL_FREE, I_FREEING and I_CLEAR are set at</span>
<a name="1688" /><span class="Maybe">    1688:</span> <span class="k"> * various stages of removing an inode.</span>
<a name="1689" /><span class="Maybe">    1689:</span> <span class="k"> *</span>
<a name="1690" /><span class="Maybe">    1690:</span> <span class="k"> * Two bits are used for locking and completion notification, I_NEW and I_SYNC.</span>
<a name="1691" /><span class="Maybe">    1691:</span> <span class="k"> *</span>
<a name="1692" /><span class="Maybe">    1692:</span> <span class="k"> * I_DIRTY_SYNC        Inode is dirty, but doesn&apos;t have to be written on</span>
<a name="1693" /><span class="Maybe">    1693:</span> <span class="k"> *            fdatasync().  i_atime is the usual cause.</span>
<a name="1694" /><span class="Maybe">    1694:</span> <span class="k"> * I_DIRTY_DATASYNC    Data-related inode changes pending. We keep track of</span>
<a name="1695" /><span class="Maybe">    1695:</span> <span class="k"> *            these changes separately from I_DIRTY_SYNC so that we</span>
<a name="1696" /><span class="Maybe">    1696:</span> <span class="k"> *            don&apos;t have to write inode on fdatasync() when only</span>
<a name="1697" /><span class="Maybe">    1697:</span> <span class="k"> *            mtime has changed in it.</span>
<a name="1698" /><span class="Maybe">    1698:</span> <span class="k"> * I_DIRTY_PAGES    Inode has dirty pages.  Inode itself may be clean.</span>
<a name="1699" /><span class="Maybe">    1699:</span> <span class="k"> * I_NEW        Serves as both a mutex and completion notification.</span>
<a name="1700" /><span class="Maybe">    1700:</span> <span class="k"> *            New inodes set I_NEW.  If two processes both create</span>
<a name="1701" /><span class="Maybe">    1701:</span> <span class="k"> *            the same inode, one of them will release its inode and</span>
<a name="1702" /><span class="Maybe">    1702:</span> <span class="k"> *            wait for I_NEW to be released before returning.</span>
<a name="1703" /><span class="Maybe">    1703:</span> <span class="k"> *            Inodes in I_WILL_FREE, I_FREEING or I_CLEAR state can</span>
<a name="1704" /><span class="Maybe">    1704:</span> <span class="k"> *            also cause waiting on I_NEW, without I_NEW actually</span>
<a name="1705" /><span class="Maybe">    1705:</span> <span class="k"> *            being set.  find_inode() uses this to prevent returning</span>
<a name="1706" /><span class="Maybe">    1706:</span> <span class="k"> *            nearly-dead inodes.</span>
<a name="1707" /><span class="Maybe">    1707:</span> <span class="k"> * I_WILL_FREE        Must be set when calling write_inode_now() if i_count</span>
<a name="1708" /><span class="Maybe">    1708:</span> <span class="k"> *            is zero.  I_FREEING must be set when I_WILL_FREE is</span>
<a name="1709" /><span class="Maybe">    1709:</span> <span class="k"> *            cleared.</span>
<a name="1710" /><span class="Maybe">    1710:</span> <span class="k"> * I_FREEING        Set when inode is about to be freed but still has dirty</span>
<a name="1711" /><span class="Maybe">    1711:</span> <span class="k"> *            pages or buffers attached or the inode itself is still</span>
<a name="1712" /><span class="Maybe">    1712:</span> <span class="k"> *            dirty.</span>
<a name="1713" /><span class="Maybe">    1713:</span> <span class="k"> * I_CLEAR        Added by clear_inode().  In this state the inode is</span>
<a name="1714" /><span class="Maybe">    1714:</span> <span class="k"> *            clean and can be destroyed.  Inode keeps I_FREEING.</span>
<a name="1715" /><span class="Maybe">    1715:</span> <span class="k"> *</span>
<a name="1716" /><span class="Maybe">    1716:</span> <span class="k"> *            Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are</span>
<a name="1717" /><span class="Maybe">    1717:</span> <span class="k"> *            prohibited for many purposes.  iget() must wait for</span>
<a name="1718" /><span class="Maybe">    1718:</span> <span class="k"> *            the inode to be completely released, then create it</span>
<a name="1719" /><span class="Maybe">    1719:</span> <span class="k"> *            anew.  Other functions will just ignore such inodes,</span>
<a name="1720" /><span class="Maybe">    1720:</span> <span class="k"> *            if appropriate.  I_NEW is used for waiting.</span>
<a name="1721" /><span class="Maybe">    1721:</span> <span class="k"> *</span>
<a name="1722" /><span class="Maybe">    1722:</span> <span class="k"> * I_SYNC        Writeback of inode is running. The bit is set during</span>
<a name="1723" /><span class="Maybe">    1723:</span> <span class="k"> *            data writeback, and cleared with a wakeup on the bit</span>
<a name="1724" /><span class="Maybe">    1724:</span> <span class="k"> *            address once it is done. The bit is also used to pin</span>
<a name="1725" /><span class="Maybe">    1725:</span> <span class="k"> *            the inode in memory for flusher thread.</span>
<a name="1726" /><span class="Maybe">    1726:</span> <span class="k"> *</span>
<a name="1727" /><span class="Maybe">    1727:</span> <span class="k"> * I_REFERENCED        Marks the inode as recently references on the LRU list.</span>
<a name="1728" /><span class="Maybe">    1728:</span> <span class="k"> *</span>
<a name="1729" /><span class="Maybe">    1729:</span> <span class="k"> * I_DIO_WAKEUP        Never set.  Only used as a key for wait_on_bit().</span>
<a name="1730" /><span class="Maybe">    1730:</span> <span class="k"> *</span>
<a name="1731" /><span class="Maybe">    1731:</span> <span class="k"> * Q: What is the difference between I_WILL_FREE and I_FREEING?</span>
<a name="1732" /><span class="Maybe">    1732:</span> <span class="k"> */</span>
<a name="1733" /><span class="Maybe">    1733:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9TWU5DXzA_"><span class="b">I_DIRTY_SYNC</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1734" /><span class="Maybe">    1734:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9EQVRBU1lOQ18w"><span class="b">I_DIRTY_DATASYNC</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">1</span><span class="f">)</span>
<a name="1735" /><span class="Maybe">    1735:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9QQUdFU18w"><span class="b">I_DIRTY_PAGES</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span>
<a name="1736" /><span class="Maybe">    1736:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19JX05FV18w"><span class="b">__I_NEW</span></a>            <span class="c">3</span>
<a name="1737" /><span class="Maybe">    1737:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9ORVdfMA__"><span class="b">I_NEW</span></a>            <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_X19JX05FV18w"><span class="b">__I_NEW</span></a><span class="f">)</span>
<a name="1738" /><span class="Maybe">    1738:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9XSUxMX0ZSRUVfMA__"><span class="b">I_WILL_FREE</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">4</span><span class="f">)</span>
<a name="1739" /><span class="Maybe">    1739:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9GUkVFSU5HXzA_"><span class="b">I_FREEING</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">5</span><span class="f">)</span>
<a name="1740" /><span class="Maybe">    1740:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9DTEVBUl8w"><span class="b">I_CLEAR</span></a>            <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">6</span><span class="f">)</span>
<a name="1741" /><span class="Maybe">    1741:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19JX1NZTkNfMA__"><span class="b">__I_SYNC</span></a>        <span class="c">7</span>
<a name="1742" /><span class="Maybe">    1742:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9TWU5DXzA_"><span class="b">I_SYNC</span></a>            <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_X19JX1NZTkNfMA__"><span class="b">__I_SYNC</span></a><span class="f">)</span>
<a name="1743" /><span class="Maybe">    1743:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9SRUZFUkVOQ0VEXzA_"><span class="b">I_REFERENCED</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">8</span><span class="f">)</span>
<a name="1744" /><span class="Maybe">    1744:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19JX0RJT19XQUtFVVBfMA__"><span class="b">__I_DIO_WAKEUP</span></a>        <span class="c">9</span>
<a name="1745" /><span class="Maybe">    1745:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9ESU9fV0FLRVVQXzA_"><span class="b">I_DIO_WAKEUP</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_SV9ESU9fV0FLRVVQXzA_"><span class="b">I_DIO_WAKEUP</span></a><span class="f">)</span>
<a name="1746" /><span class="Maybe">    1746:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SV9MSU5LQUJMRV8w"><span class="b">I_LINKABLE</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <span class="c">10</span><span class="f">)</span>
<a name="1747" /><span class="Maybe">    1747:</span> 
<a name="1748" /><span class="Maybe">    1748:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV8w"><span class="b">I_DIRTY</span></a> <span class="f">(</span><a href="cpu.c_macros_ref.html#_SV9ESVJUWV9TWU5DXzA_"><span class="b">I_DIRTY_SYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9EQVRBU1lOQ18w"><span class="b">I_DIRTY_DATASYNC</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9QQUdFU18w"><span class="b">I_DIRTY_PAGES</span></a><span class="f">)</span>
<a name="1749" /><span class="Maybe">    1749:</span> 
<a name="1750" /><span class="Maybe">    1750:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__mark_inode_dirty</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="1751" /><span class="Maybe">    1751:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">mark_inode_dirty</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1752" /><span class="Maybe">    1752:</span> <span class="f">{</span>
<a name="1753" /><span class="Maybe">    1753:</span>     <span class="b">__mark_inode_dirty</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV8w"><span class="b">I_DIRTY</span></a><span class="f">)</span><span class="f">;</span>
<a name="1754" /><span class="Maybe">    1754:</span> <span class="f">}</span>
<a name="1755" /><span class="Maybe">    1755:</span> 
<a name="1756" /><span class="Maybe">    1756:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">mark_inode_dirty_sync</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1757" /><span class="Maybe">    1757:</span> <span class="f">{</span>
<a name="1758" /><span class="Maybe">    1758:</span>     <span class="b">__mark_inode_dirty</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_SV9ESVJUWV9TWU5DXzA_"><span class="b">I_DIRTY_SYNC</span></a><span class="f">)</span><span class="f">;</span>
<a name="1759" /><span class="Maybe">    1759:</span> <span class="f">}</span>
<a name="1760" /><span class="Maybe">    1760:</span> 
<a name="1761" /><span class="Maybe">    1761:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">inc_nlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1762" /><span class="Maybe">    1762:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">drop_nlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1763" /><span class="Maybe">    1763:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">clear_nlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1764" /><span class="Maybe">    1764:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">set_nlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">nlink</span><span class="f">)</span><span class="f">;</span>
<a name="1765" /><span class="Maybe">    1765:</span> 
<a name="1766" /><span class="Maybe">    1766:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inode_inc_link_count</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1767" /><span class="Maybe">    1767:</span> <span class="f">{</span>
<a name="1768" /><span class="Maybe">    1768:</span>     <span class="b">inc_nlink</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1769" /><span class="Maybe">    1769:</span>     <span class="b">mark_inode_dirty</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1770" /><span class="Maybe">    1770:</span> <span class="f">}</span>
<a name="1771" /><span class="Maybe">    1771:</span> 
<a name="1772" /><span class="Maybe">    1772:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inode_dec_link_count</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1773" /><span class="Maybe">    1773:</span> <span class="f">{</span>
<a name="1774" /><span class="Maybe">    1774:</span>     <span class="b">drop_nlink</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1775" /><span class="Maybe">    1775:</span>     <span class="b">mark_inode_dirty</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1776" /><span class="Maybe">    1776:</span> <span class="f">}</span>
<a name="1777" /><span class="Maybe">    1777:</span> 
<a name="1778" /><span class="Maybe">    1778:</span> <span class="k">/**</span>
<a name="1779" /><span class="Maybe">    1779:</span> <span class="k"> * inode_inc_iversion - increments i_version</span>
<a name="1780" /><span class="Maybe">    1780:</span> <span class="k"> * @inode: inode that need to be updated</span>
<a name="1781" /><span class="Maybe">    1781:</span> <span class="k"> *</span>
<a name="1782" /><span class="Maybe">    1782:</span> <span class="k"> * Every time the inode is modified, the i_version field will be incremented.</span>
<a name="1783" /><span class="Maybe">    1783:</span> <span class="k"> * The filesystem has to be mounted with i_version flag</span>
<a name="1784" /><span class="Maybe">    1784:</span> <span class="k"> */</span>
<a name="1785" /><span class="Maybe">    1785:</span> 
<a name="1786" /><span class="Maybe">    1786:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inode_inc_iversion</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1787" /><span class="Maybe">    1787:</span> <span class="f">{</span>
<a name="1788" /><span class="Maybe">    1788:</span>        <span class="b">spin_lock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_lock</span><span class="f">)</span><span class="f">;</span>
<a name="1789" /><span class="Maybe">    1789:</span>        <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_version</span><span class="f">++</span><span class="f">;</span>
<a name="1790" /><span class="Maybe">    1790:</span>        <span class="b">spin_unlock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_lock</span><span class="f">)</span><span class="f">;</span>
<a name="1791" /><span class="Maybe">    1791:</span> <span class="f">}</span>
<a name="1792" /><span class="Maybe">    1792:</span> 
<a name="1793" /><span class="Maybe">    1793:</span> <span class="m">enum</span> <span class="b">file_time_flags</span> <span class="f">{</span>
<a name="1794" /><span class="Maybe">    1794:</span>     <span class="b">S_ATIME</span> <span class="f">=</span> <span class="c">1</span><span class="f">,</span>
<a name="1795" /><span class="Maybe">    1795:</span>     <span class="b">S_MTIME</span> <span class="f">=</span> <span class="c">2</span><span class="f">,</span>
<a name="1796" /><span class="Maybe">    1796:</span>     <span class="b">S_CTIME</span> <span class="f">=</span> <span class="c">4</span><span class="f">,</span>
<a name="1797" /><span class="Maybe">    1797:</span>     <span class="b">S_VERSION</span> <span class="f">=</span> <span class="c">8</span><span class="f">,</span>
<a name="1798" /><span class="Maybe">    1798:</span> <span class="f">}</span><span class="f">;</span>
<a name="1799" /><span class="Maybe">    1799:</span> 
<a name="1800" /><span class="Maybe">    1800:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">touch_atime</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1801" /><span class="Maybe">    1801:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_accessed</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="1802" /><span class="Maybe">    1802:</span> <span class="f">{</span>
<a name="1803" /><span class="Maybe">    1803:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="f">(</span><span class="b">file</span><span class="f">-&gt;</span><span class="b">f_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_T19OT0FUSU1FXzA_"><span class="b">O_NOATIME</span></a><span class="f">)</span><span class="f">)</span>
<a name="1804" /><span class="Maybe">    1804:</span>         <span class="b">touch_atime</span><span class="f">(</span><span class="f">&amp;</span><span class="b">file</span><span class="f">-&gt;</span><span class="b">f_path</span><span class="f">)</span><span class="f">;</span>
<a name="1805" /><span class="Maybe">    1805:</span> <span class="f">}</span>
<a name="1806" /><span class="Maybe">    1806:</span> 
<a name="1807" /><span class="Maybe">    1807:</span> <span class="m">int</span> <span class="b">sync_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">writeback_control</span> <span class="f">*</span><span class="b">wbc</span><span class="f">)</span><span class="f">;</span>
<a name="1808" /><span class="Maybe">    1808:</span> <span class="m">int</span> <span class="b">sync_inode_metadata</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">int</span> <span class="b">wait</span><span class="f">)</span><span class="f">;</span>
<a name="1809" /><span class="Maybe">    1809:</span> 
<a name="1810" /><span class="Maybe">    1810:</span> <span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">{</span>
<a name="1811" /><span class="Maybe">    1811:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">;</span>
<a name="1812" /><span class="Maybe">    1812:</span>     <span class="m">int</span> <span class="b">fs_flags</span><span class="f">;</span>
<a name="1813" /><span class="Maybe">    1813:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfUkVRVUlSRVNfREVWXzA_"><span class="b">FS_REQUIRES_DEV</span></a>        <span class="c">1</span> 
<a name="1814" /><span class="Maybe">    1814:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfQklOQVJZX01PVU5UREFUQV8w"><span class="b">FS_BINARY_MOUNTDATA</span></a>    <span class="c">2</span>
<a name="1815" /><span class="Maybe">    1815:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfSEFTX1NVQlRZUEVfMA__"><span class="b">FS_HAS_SUBTYPE</span></a>        <span class="c">4</span>
<a name="1816" /><span class="Maybe">    1816:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfVVNFUk5TX01PVU5UXzA_"><span class="b">FS_USERNS_MOUNT</span></a>        <span class="c">8</span>    <span class="k">/* Can be mounted by userns root */</span>
<a name="1817" /><span class="Maybe">    1817:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfVVNFUk5TX0RFVl9NT1VOVF8w"><span class="b">FS_USERNS_DEV_MOUNT</span></a>    <span class="c">16</span> <span class="k">/* A userns mount does not imply MNT_NODEV */</span>
<a name="1818" /><span class="Maybe">    1818:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RlNfUkVOQU1FX0RPRVNfRF9NT1ZFXzA_"><span class="b">FS_RENAME_DOES_D_MOVE</span></a>    <span class="c">32768</span>    <span class="k">/* FS will handle d_move() during rename() internally. */</span>
<a name="1819" /><span class="Maybe">    1819:</span>     <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">(</span><span class="f">*</span><span class="b">mount</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span>
<a name="1820" /><span class="Maybe">    1820:</span>                <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1821" /><span class="Maybe">    1821:</span>     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">kill_sb</span><span class="f">)</span> <span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1822" /><span class="Maybe">    1822:</span>     <span class="m">struct</span> <span class="b">module</span> <span class="f">*</span><span class="b">owner</span><span class="f">;</span>
<a name="1823" /><span class="Maybe">    1823:</span>     <span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span> <span class="b">next</span><span class="f">;</span>
<a name="1824" /><span class="Maybe">    1824:</span>     <span class="m">struct</span> <span class="b">hlist_head</span> <span class="b">fs_supers</span><span class="f">;</span>
<a name="1825" /><span class="Maybe">    1825:</span> 
<a name="1826" /><span class="Maybe">    1826:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">s_lock_key</span><span class="f">;</span>
<a name="1827" /><span class="Maybe">    1827:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">s_umount_key</span><span class="f">;</span>
<a name="1828" /><span class="Maybe">    1828:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">s_vfs_rename_key</span><span class="f">;</span>
<a name="1829" /><span class="Maybe">    1829:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">s_writers_key</span><span class="f">[</span><a href="cpu.c_macros_ref.html#_U0JfRlJFRVpFX0xFVkVMU18w"><span class="b">SB_FREEZE_LEVELS</span></a><span class="f">]</span><span class="f">;</span>
<a name="1830" /><span class="Maybe">    1830:</span> 
<a name="1831" /><span class="Maybe">    1831:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">i_lock_key</span><span class="f">;</span>
<a name="1832" /><span class="Maybe">    1832:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">i_mutex_key</span><span class="f">;</span>
<a name="1833" /><span class="Maybe">    1833:</span>     <span class="m">struct</span> <span class="b">lock_class_key</span> <span class="b">i_mutex_dir_key</span><span class="f">;</span>
<a name="1834" /><span class="Maybe">    1834:</span> <span class="f">}</span><span class="f">;</span>
<a name="1835" /><span class="Maybe">    1835:</span> 
<a name="1836" /><span class="Maybe">    1836:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TU9EVUxFX0FMSUFTX0ZTXzA_"><span class="b">MODULE_ALIAS_FS</span></a><span class="f">(</span><span class="b">NAME</span><span class="f">)</span> <span class="b">MODULE_ALIAS</span><span class="f">(</span><span class="e">&quot;fs-&quot;</span> <span class="b">NAME</span><span class="f">)</span>
<a name="1837" /><span class="Maybe">    1837:</span> 
<a name="1838" /><span class="Maybe">    1838:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_ns</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs_type</span><span class="f">,</span> <span class="m">int</span> <span class="b">flags</span><span class="f">,</span>
<a name="1839" /><span class="Maybe">    1839:</span>     <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fill_super</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1840" /><span class="Maybe">    1840:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs_type</span><span class="f">,</span>
<a name="1841" /><span class="Maybe">    1841:</span>     <span class="m">int</span> <span class="b">flags</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">dev_name</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span>
<a name="1842" /><span class="Maybe">    1842:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fill_super</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1843" /><span class="Maybe">    1843:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_single</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs_type</span><span class="f">,</span>
<a name="1844" /><span class="Maybe">    1844:</span>     <span class="m">int</span> <span class="b">flags</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span>
<a name="1845" /><span class="Maybe">    1845:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fill_super</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1846" /><span class="Maybe">    1846:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_nodev</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs_type</span><span class="f">,</span>
<a name="1847" /><span class="Maybe">    1847:</span>     <span class="m">int</span> <span class="b">flags</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">,</span>
<a name="1848" /><span class="Maybe">    1848:</span>     <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">fill_super</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1849" /><span class="Maybe">    1849:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_subtree</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">mnt</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">path</span><span class="f">)</span><span class="f">;</span>
<a name="1850" /><span class="Maybe">    1850:</span> <span class="m">void</span> <span class="b">generic_shutdown_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1851" /><span class="Maybe">    1851:</span> <span class="m">void</span> <span class="b">kill_block_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1852" /><span class="Maybe">    1852:</span> <span class="m">void</span> <span class="b">kill_anon_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1853" /><span class="Maybe">    1853:</span> <span class="m">void</span> <span class="b">kill_litter_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1854" /><span class="Maybe">    1854:</span> <span class="m">void</span> <span class="b">deactivate_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1855" /><span class="Maybe">    1855:</span> <span class="m">void</span> <span class="b">deactivate_locked_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="1856" /><span class="Maybe">    1856:</span> <span class="m">int</span> <span class="b">set_anon_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">s</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">)</span><span class="f">;</span>
<a name="1857" /><span class="Maybe">    1857:</span> <span class="m">int</span> <span class="b">get_anon_bdev</span><span class="f">(</span><span class="b">dev_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1858" /><span class="Maybe">    1858:</span> <span class="m">void</span> <span class="b">free_anon_bdev</span><span class="f">(</span><span class="b">dev_t</span><span class="f">)</span><span class="f">;</span>
<a name="1859" /><span class="Maybe">    1859:</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sget</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">type</span><span class="f">,</span>
<a name="1860" /><span class="Maybe">    1860:</span>             <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">test</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span>
<a name="1861" /><span class="Maybe">    1861:</span>             <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">set</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span>
<a name="1862" /><span class="Maybe">    1862:</span>             <span class="m">int</span> <span class="b">flags</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">)</span><span class="f">;</span>
<a name="1863" /><span class="Maybe">    1863:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">mount_pseudo</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span>
<a name="1864" /><span class="Maybe">    1864:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">super_operations</span> <span class="f">*</span><span class="b">ops</span><span class="f">,</span>
<a name="1865" /><span class="Maybe">    1865:</span>     <span class="m">const</span> <span class="m">struct</span> <span class="b">dentry_operations</span> <span class="f">*</span><span class="b">dops</span><span class="f">,</span>
<a name="1866" /><span class="Maybe">    1866:</span>     <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="1867" /><span class="Maybe">    1867:</span> 
<a name="1868" /><span class="Maybe">    1868:</span> <span class="k">/* Alas, no aliases. Too much hassle with bringing module.h everywhere */</span>
<a name="1869" /><span class="Maybe">    1869:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Zm9wc19nZXRfMA__"><span class="b">fops_get</span></a><span class="f">(</span><span class="b">fops</span><span class="f">)</span> \
<a name="1870" /><span class="Maybe">    1870:</span>     <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">fops</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">try_module_get</span><span class="f">(</span><span class="f">(</span><span class="b">fops</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">owner</span><span class="f">)</span> <span class="f">?</span> <span class="f">(</span><span class="b">fops</span><span class="f">)</span> <span class="f">:</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">)</span>
<a name="1871" /><span class="Maybe">    1871:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Zm9wc19wdXRfMA__"><span class="b">fops_put</span></a><span class="f">(</span><span class="b">fops</span><span class="f">)</span> \
<a name="1872" /><span class="Maybe">    1872:</span>     <span class="m">do</span> <span class="f">{</span> <span class="m">if</span> <span class="f">(</span><span class="b">fops</span><span class="f">)</span> <span class="b">module_put</span><span class="f">(</span><span class="f">(</span><span class="b">fops</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">owner</span><span class="f">)</span><span class="f">;</span> <span class="f">}</span> <span class="m">while</span><span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1873" /><span class="Maybe">    1873:</span> <span class="k">/*</span>
<a name="1874" /><span class="Maybe">    1874:</span> <span class="k"> * This one is to be used *ONLY* from -&gt;open() instances.</span>
<a name="1875" /><span class="Maybe">    1875:</span> <span class="k"> * fops must be non-NULL, pinned down *and* module dependencies</span>
<a name="1876" /><span class="Maybe">    1876:</span> <span class="k"> * should be sufficient to pin the caller down as well.</span>
<a name="1877" /><span class="Maybe">    1877:</span> <span class="k"> */</span>
<a name="1878" /><span class="Maybe">    1878:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cmVwbGFjZV9mb3BzXzA_"><span class="b">replace_fops</span></a><span class="f">(</span><span class="b">f</span><span class="f">,</span> <span class="b">fops</span><span class="f">)</span> \
<a name="1879" /><span class="Maybe">    1879:</span>     <span class="m">do</span> <span class="f">{</span>    \
<a name="1880" /><span class="Maybe">    1880:</span>         <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">__file</span> <span class="f">=</span> <span class="f">(</span><span class="b">f</span><span class="f">)</span><span class="f">;</span> \
<a name="1881" /><span class="Maybe">    1881:</span>         <a href="cpu.c_macros_noref.html#_Zm9wc19wdXRfMA__"><span class="b">fops_put</span></a><span class="f">(</span><span class="b">__file</span><span class="f">-&gt;</span><span class="b">f_op</span><span class="f">)</span><span class="f">;</span> \
<a name="1882" /><span class="Maybe">    1882:</span>         <a href="cpu.c_macros_ref.html#_QlVHX09OXzA_"><span class="b">BUG_ON</span></a><span class="f">(</span><span class="f">!</span><span class="f">(</span><span class="b">__file</span><span class="f">-&gt;</span><span class="b">f_op</span> <span class="f">=</span> <span class="f">(</span><span class="b">fops</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">;</span> \
<a name="1883" /><span class="Maybe">    1883:</span>     <span class="f">}</span> <span class="m">while</span><span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1884" /><span class="Maybe">    1884:</span> 
<a name="1885" /><span class="Maybe">    1885:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">register_filesystem</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1886" /><span class="Maybe">    1886:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">unregister_filesystem</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1887" /><span class="Maybe">    1887:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">kern_mount_data</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">)</span><span class="f">;</span>
<a name="1888" /><span class="Maybe">    1888:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_a2Vybl9tb3VudF8w"><span class="b">kern_mount</span></a><span class="f">(</span><span class="b">type</span><span class="f">)</span> <span class="b">kern_mount_data</span><span class="f">(</span><span class="b">type</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1889" /><span class="Maybe">    1889:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">kern_unmount</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">mnt</span><span class="f">)</span><span class="f">;</span>
<a name="1890" /><span class="Maybe">    1890:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">may_umount_tree</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1891" /><span class="Maybe">    1891:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">may_umount</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1892" /><span class="Maybe">    1892:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">do_mount</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1893" /><span class="Maybe">    1893:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">collect_mounts</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1894" /><span class="Maybe">    1894:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">drop_collected_mounts</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1895" /><span class="Maybe">    1895:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">iterate_mounts</span><span class="f">(</span><span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">,</span>
<a name="1896" /><span class="Maybe">    1896:</span>               <span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1897" /><span class="Maybe">    1897:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_statfs</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1898" /><span class="Maybe">    1898:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">user_statfs</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1899" /><span class="Maybe">    1899:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fd_statfs</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1900" /><span class="Maybe">    1900:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_ustat</span><span class="f">(</span><span class="b">dev_t</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1901" /><span class="Maybe">    1901:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">freeze_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">super</span><span class="f">)</span><span class="f">;</span>
<a name="1902" /><span class="Maybe">    1902:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">thaw_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">super</span><span class="f">)</span><span class="f">;</span>
<a name="1903" /><span class="Maybe">    1903:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">our_mnt</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="b">mnt</span><span class="f">)</span><span class="f">;</span>
<a name="1904" /><span class="Maybe">    1904:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">fs_fully_visible</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1905" /><span class="Maybe">    1905:</span> 
<a name="1906" /><span class="Maybe">    1906:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">current_umask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="1907" /><span class="Maybe">    1907:</span> 
<a name="1908" /><span class="Maybe">    1908:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">ihold</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1909" /><span class="Maybe">    1909:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">iput</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1910" /><span class="Maybe">    1910:</span> 
<a name="1911" /><span class="Maybe">    1911:</span> <span class="k">/* /sys/fs */</span>
<a name="1912" /><span class="Maybe">    1912:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">kobject</span> <span class="f">*</span><span class="b">fs_kobj</span><span class="f">;</span>
<a name="1913" /><span class="Maybe">    1913:</span> 
<a name="1914" /><span class="Maybe">    1914:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_TUFYX1JXX0NPVU5UXzA_"><span class="b">MAX_RW_COUNT</span></a> <span class="f">(</span><a href="cpu.c_macros_ref.html#_SU5UX01BWF8w"><span class="b">INT_MAX</span></a> <span class="f">&amp;</span> <span class="b">PAGE_CACHE_MASK</span><span class="f">)</span>
<a name="1915" /><span class="Maybe">    1915:</span> 
<a name="1916" /><span class="Maybe">    1916:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RkxPQ0tfVkVSSUZZX1JFQURfMA__"><span class="b">FLOCK_VERIFY_READ</span></a>  <span class="c">1</span>
<a name="1917" /><span class="Maybe">    1917:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_RkxPQ0tfVkVSSUZZX1dSSVRFXzA_"><span class="b">FLOCK_VERIFY_WRITE</span></a> <span class="c">2</span>
<a name="1918" /><span class="Maybe">    1918:</span> 
<a name="1919" /><span class="Maybe">    1919:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0ZJTEVfTE9DS0lOR18w"><span class="b">CONFIG_FILE_LOCKING</span></a>
<a name="1920" /><span class="Maybe">    1920:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">locks_mandatory_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="1921" /><span class="Maybe">    1921:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">locks_mandatory_area</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="1922" /><span class="Maybe">    1922:</span> 
<a name="1923" /><span class="Maybe">    1923:</span> <span class="k">/*</span>
<a name="1924" /><span class="Maybe">    1924:</span> <span class="k"> * Candidates for mandatory locking have the setgid bit set</span>
<a name="1925" /><span class="Maybe">    1925:</span> <span class="k"> * but no group execute bit -  an otherwise meaningless combination.</span>
<a name="1926" /><span class="Maybe">    1926:</span> <span class="k"> */</span>
<a name="1927" /><span class="Maybe">    1927:</span> 
<a name="1928" /><span class="Maybe">    1928:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">__mandatory_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">ino</span><span class="f">)</span>
<a name="1929" /><span class="Maybe">    1929:</span> <span class="f">{</span>
<a name="1930" /><span class="Maybe">    1930:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">ino</span><span class="f">-&gt;</span><span class="b">i_mode</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_U19JU0dJRF8w"><span class="b">S_ISGID</span></a> <span class="f">|</span> <a href="cpu.c_macros_ref.html#_U19JWEdSUF8w"><span class="b">S_IXGRP</span></a><span class="f">)</span><span class="f">)</span> <span class="f">==</span> <a href="cpu.c_macros_ref.html#_U19JU0dJRF8w"><span class="b">S_ISGID</span></a><span class="f">;</span>
<a name="1931" /><span class="Maybe">    1931:</span> <span class="f">}</span>
<a name="1932" /><span class="Maybe">    1932:</span> 
<a name="1933" /><span class="Maybe">    1933:</span> <span class="k">/*</span>
<a name="1934" /><span class="Maybe">    1934:</span> <span class="k"> * ... and these candidates should be on MS_MANDLOCK mounted fs,</span>
<a name="1935" /><span class="Maybe">    1935:</span> <span class="k"> * otherwise these will be advisory locks</span>
<a name="1936" /><span class="Maybe">    1936:</span> <span class="k"> */</span>
<a name="1937" /><span class="Maybe">    1937:</span> 
<a name="1938" /><span class="Maybe">    1938:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">mandatory_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">ino</span><span class="f">)</span>
<a name="1939" /><span class="Maybe">    1939:</span> <span class="f">{</span>
<a name="1940" /><span class="Maybe">    1940:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_SVNfTUFORExPQ0tfMA__"><span class="b">IS_MANDLOCK</span></a><span class="f">(</span><span class="b">ino</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="b">__mandatory_lock</span><span class="f">(</span><span class="b">ino</span><span class="f">)</span><span class="f">;</span>
<a name="1941" /><span class="Maybe">    1941:</span> <span class="f">}</span>
<a name="1942" /><span class="Maybe">    1942:</span> 
<a name="1943" /><span class="Maybe">    1943:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_verify_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="1944" /><span class="Maybe">    1944:</span> <span class="f">{</span>
<a name="1945" /><span class="Maybe">    1945:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">mandatory_lock</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">)</span>
<a name="1946" /><span class="Maybe">    1946:</span>         <span class="m">return</span> <span class="b">locks_mandatory_locked</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1947" /><span class="Maybe">    1947:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1948" /><span class="Maybe">    1948:</span> <span class="f">}</span>
<a name="1949" /><span class="Maybe">    1949:</span> 
<a name="1950" /><span class="Maybe">    1950:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_verify_truncate</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="1951" /><span class="Maybe">    1951:</span>                     <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span>
<a name="1952" /><span class="Maybe">    1952:</span>                     <span class="b">loff_t</span> <span class="b">size</span><span class="f">)</span>
<a name="1953" /><span class="Maybe">    1953:</span> <span class="f">{</span>
<a name="1954" /><span class="Maybe">    1954:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_flock</span> <span class="f">&amp;&amp;</span> <span class="b">mandatory_lock</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">)</span>
<a name="1955" /><span class="Maybe">    1955:</span>         <span class="m">return</span> <span class="b">locks_mandatory_area</span><span class="f">(</span>
<a name="1956" /><span class="Maybe">    1956:</span>             <a href="cpu.c_macros_ref.html#_RkxPQ0tfVkVSSUZZX1dSSVRFXzA_"><span class="b">FLOCK_VERIFY_WRITE</span></a><span class="f">,</span> <span class="b">inode</span><span class="f">,</span> <span class="b">filp</span><span class="f">,</span>
<a name="1957" /><span class="Maybe">    1957:</span>             <span class="b">size</span> <span class="f">&lt;</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">?</span> <span class="b">size</span> <span class="f">:</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span><span class="f">,</span>
<a name="1958" /><span class="Maybe">    1958:</span>             <span class="f">(</span><span class="b">size</span> <span class="f">&lt;</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">?</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span> <span class="f">-</span> <span class="b">size</span>
<a name="1959" /><span class="Maybe">    1959:</span>              <span class="f">:</span> <span class="b">size</span> <span class="f">-</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_size</span><span class="f">)</span>
<a name="1960" /><span class="Maybe">    1960:</span>         <span class="f">)</span><span class="f">;</span>
<a name="1961" /><span class="Maybe">    1961:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1962" /><span class="Maybe">    1962:</span> <span class="f">}</span>
<a name="1963" /><span class="Maybe">    1963:</span> 
<a name="1964" /><span class="Maybe">    1964:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_lease</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">)</span>
<a name="1965" /><span class="Maybe">    1965:</span> <span class="f">{</span>
<a name="1966" /><span class="Maybe">    1966:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_flock</span><span class="f">)</span>
<a name="1967" /><span class="Maybe">    1967:</span>         <span class="m">return</span> <span class="b">__break_lease</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <span class="b">mode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_RkxfTEVBU0VfMA__"><span class="b">FL_LEASE</span></a><span class="f">)</span><span class="f">;</span>
<a name="1968" /><span class="Maybe">    1968:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1969" /><span class="Maybe">    1969:</span> <span class="f">}</span>
<a name="1970" /><span class="Maybe">    1970:</span> 
<a name="1971" /><span class="Maybe">    1971:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_deleg</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">)</span>
<a name="1972" /><span class="Maybe">    1972:</span> <span class="f">{</span>
<a name="1973" /><span class="Maybe">    1973:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_flock</span><span class="f">)</span>
<a name="1974" /><span class="Maybe">    1974:</span>         <span class="m">return</span> <span class="b">__break_lease</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <span class="b">mode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_RkxfREVMRUdfMA__"><span class="b">FL_DELEG</span></a><span class="f">)</span><span class="f">;</span>
<a name="1975" /><span class="Maybe">    1975:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1976" /><span class="Maybe">    1976:</span> <span class="f">}</span>
<a name="1977" /><span class="Maybe">    1977:</span> 
<a name="1978" /><span class="Maybe">    1978:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">try_break_deleg</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">)</span>
<a name="1979" /><span class="Maybe">    1979:</span> <span class="f">{</span>
<a name="1980" /><span class="Maybe">    1980:</span>     <span class="m">int</span> <span class="b">ret</span><span class="f">;</span>
<a name="1981" /><span class="Maybe">    1981:</span> 
<a name="1982" /><span class="Maybe">    1982:</span>     <span class="b">ret</span> <span class="f">=</span> <span class="b">break_deleg</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_T19XUk9OTFlfMA__"><span class="b">O_WRONLY</span></a><span class="f">|</span><a href="cpu.c_macros_ref.html#_T19OT05CTE9DS18w"><span class="b">O_NONBLOCK</span></a><span class="f">)</span><span class="f">;</span>
<a name="1983" /><span class="Maybe">    1983:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">ret</span> <span class="f">==</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RVdPVUxEQkxPQ0tfMA__"><span class="b">EWOULDBLOCK</span></a> <span class="f">&amp;&amp;</span> <span class="b">delegated_inode</span><span class="f">)</span> <span class="f">{</span>
<a name="1984" /><span class="Maybe">    1984:</span>         <span class="f">*</span><span class="b">delegated_inode</span> <span class="f">=</span> <span class="b">inode</span><span class="f">;</span>
<a name="1985" /><span class="Maybe">    1985:</span>         <span class="b">ihold</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="1986" /><span class="Maybe">    1986:</span>     <span class="f">}</span>
<a name="1987" /><span class="Maybe">    1987:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="1988" /><span class="Maybe">    1988:</span> <span class="f">}</span>
<a name="1989" /><span class="Maybe">    1989:</span> 
<a name="1990" /><span class="Maybe">    1990:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_deleg_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">)</span>
<a name="1991" /><span class="Maybe">    1991:</span> <span class="f">{</span>
<a name="1992" /><span class="Maybe">    1992:</span>     <span class="m">int</span> <span class="b">ret</span><span class="f">;</span>
<a name="1993" /><span class="Maybe">    1993:</span> 
<a name="1994" /><span class="Maybe">    1994:</span>     <span class="b">ret</span> <span class="f">=</span> <span class="b">break_deleg</span><span class="f">(</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_T19XUk9OTFlfMA__"><span class="b">O_WRONLY</span></a><span class="f">)</span><span class="f">;</span>
<a name="1995" /><span class="Maybe">    1995:</span>     <span class="b">iput</span><span class="f">(</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">)</span><span class="f">;</span>
<a name="1996" /><span class="Maybe">    1996:</span>     <span class="f">*</span><span class="b">delegated_inode</span> <span class="f">=</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1997" /><span class="Maybe">    1997:</span>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="1998" /><span class="Maybe">    1998:</span> <span class="f">}</span>
<a name="1999" /><span class="Maybe">    1999:</span> 
<a name="2000" /><span class="False">    2000:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !CONFIG_FILE_LOCKING */</span>
<a name="2001" /><span class="False">    2001:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_mandatory_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2002" /><span class="False">    2002:</span> <span class="f">{</span>
<a name="2003" /><span class="False">    2003:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2004" /><span class="False">    2004:</span> <span class="f">}</span>
<a name="2005" /><span class="False">    2005:</span> 
<a name="2006" /><span class="False">    2006:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_mandatory_area</span><span class="f">(</span><span class="m">int</span> <span class="b">rw</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="2007" /><span class="False">    2007:</span>                        <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2008" /><span class="False">    2008:</span>                        <span class="b">size_t</span> <span class="b">count</span><span class="f">)</span>
<a name="2009" /><span class="False">    2009:</span> <span class="f">{</span>
<a name="2010" /><span class="False">    2010:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2011" /><span class="False">    2011:</span> <span class="f">}</span>
<a name="2012" /><span class="False">    2012:</span> 
<a name="2013" /><span class="False">    2013:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">__mandatory_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2014" /><span class="False">    2014:</span> <span class="f">{</span>
<a name="2015" /><span class="False">    2015:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2016" /><span class="False">    2016:</span> <span class="f">}</span>
<a name="2017" /><span class="False">    2017:</span> 
<a name="2018" /><span class="False">    2018:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">mandatory_lock</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2019" /><span class="False">    2019:</span> <span class="f">{</span>
<a name="2020" /><span class="False">    2020:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2021" /><span class="False">    2021:</span> <span class="f">}</span>
<a name="2022" /><span class="False">    2022:</span> 
<a name="2023" /><span class="False">    2023:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_verify_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2024" /><span class="False">    2024:</span> <span class="f">{</span>
<a name="2025" /><span class="False">    2025:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2026" /><span class="False">    2026:</span> <span class="f">}</span>
<a name="2027" /><span class="False">    2027:</span> 
<a name="2028" /><span class="False">    2028:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">locks_verify_truncate</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span>
<a name="2029" /><span class="False">    2029:</span>                     <span class="b">size_t</span> <span class="b">size</span><span class="f">)</span>
<a name="2030" /><span class="False">    2030:</span> <span class="f">{</span>
<a name="2031" /><span class="False">    2031:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2032" /><span class="False">    2032:</span> <span class="f">}</span>
<a name="2033" /><span class="False">    2033:</span> 
<a name="2034" /><span class="False">    2034:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_lease</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">)</span>
<a name="2035" /><span class="False">    2035:</span> <span class="f">{</span>
<a name="2036" /><span class="False">    2036:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2037" /><span class="False">    2037:</span> <span class="f">}</span>
<a name="2038" /><span class="False">    2038:</span> 
<a name="2039" /><span class="False">    2039:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_deleg</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">mode</span><span class="f">)</span>
<a name="2040" /><span class="False">    2040:</span> <span class="f">{</span>
<a name="2041" /><span class="False">    2041:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2042" /><span class="False">    2042:</span> <span class="f">}</span>
<a name="2043" /><span class="False">    2043:</span> 
<a name="2044" /><span class="False">    2044:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">try_break_deleg</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">)</span>
<a name="2045" /><span class="False">    2045:</span> <span class="f">{</span>
<a name="2046" /><span class="False">    2046:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2047" /><span class="False">    2047:</span> <span class="f">}</span>
<a name="2048" /><span class="False">    2048:</span> 
<a name="2049" /><span class="False">    2049:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">break_deleg_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="b">delegated_inode</span><span class="f">)</span>
<a name="2050" /><span class="False">    2050:</span> <span class="f">{</span>
<a name="2051" /><span class="False">    2051:</span>     <a href="cpu.c_macros_ref.html#_QlVHXzA_"><span class="b">BUG</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2052" /><span class="False">    2052:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2053" /><span class="False">    2053:</span> <span class="f">}</span>
<a name="2054" /><span class="False">    2054:</span> 
<a name="2055" /><span class="Maybe">    2055:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* CONFIG_FILE_LOCKING */</span>
<a name="2056" /><span class="Maybe">    2056:</span> 
<a name="2057" /><span class="Maybe">    2057:</span> <span class="k">/* fs/open.c */</span>
<a name="2058" /><span class="Maybe">    2058:</span> <span class="m">struct</span> <span class="b">audit_names</span><span class="f">;</span>
<a name="2059" /><span class="Maybe">    2059:</span> <span class="m">struct</span> <span class="b">filename</span> <span class="f">{</span>
<a name="2060" /><span class="Maybe">    2060:</span>     <span class="m">const</span> <span class="m">char</span>        <span class="f">*</span><span class="b">name</span><span class="f">;</span>    <span class="k">/* pointer to actual string */</span>
<a name="2061" /><span class="Maybe">    2061:</span>     <span class="m">const</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="m">char</span>    <span class="f">*</span><span class="b">uptr</span><span class="f">;</span>    <span class="k">/* original userland pointer */</span>
<a name="2062" /><span class="Maybe">    2062:</span>     <span class="m">struct</span> <span class="b">audit_names</span>    <span class="f">*</span><span class="b">aname</span><span class="f">;</span>
<a name="2063" /><span class="Maybe">    2063:</span>     <span class="m">bool</span>            <span class="b">separate</span><span class="f">;</span> <span class="k">/* should &quot;name&quot; be freed? */</span>
<a name="2064" /><span class="Maybe">    2064:</span> <span class="f">}</span><span class="f">;</span>
<a name="2065" /><span class="Maybe">    2065:</span> 
<a name="2066" /><span class="Maybe">    2066:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">vfs_truncate</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="2067" /><span class="Maybe">    2067:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_truncate</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">time_attrs</span><span class="f">,</span>
<a name="2068" /><span class="Maybe">    2068:</span>                <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="2069" /><span class="Maybe">    2069:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_fallocate</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">int</span> <span class="b">mode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2070" /><span class="Maybe">    2070:</span>             <span class="b">loff_t</span> <span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="2071" /><span class="Maybe">    2071:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">do_sys_open</span><span class="f">(</span><span class="m">int</span> <span class="b">dfd</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">filename</span><span class="f">,</span> <span class="m">int</span> <span class="b">flags</span><span class="f">,</span>
<a name="2072" /><span class="Maybe">    2072:</span>             <span class="b">umode_t</span> <span class="b">mode</span><span class="f">)</span><span class="f">;</span>
<a name="2073" /><span class="Maybe">    2073:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file_open_name</span><span class="f">(</span><span class="m">struct</span> <span class="b">filename</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">)</span><span class="f">;</span>
<a name="2074" /><span class="Maybe">    2074:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp_open</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">)</span><span class="f">;</span>
<a name="2075" /><span class="Maybe">    2075:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file_open_root</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">,</span>
<a name="2076" /><span class="Maybe">    2076:</span>                    <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2077" /><span class="Maybe">    2077:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span> <span class="b">dentry_open</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">cred</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2078" /><span class="Maybe">    2078:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filp_close</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">fl_owner_t</span> <span class="b">id</span><span class="f">)</span><span class="f">;</span>
<a name="2079" /><span class="Maybe">    2079:</span> 
<a name="2080" /><span class="Maybe">    2080:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">filename</span> <span class="f">*</span><span class="b">getname</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2081" /><span class="Maybe">    2081:</span> 
<a name="2082" /><span class="Maybe">    2082:</span> <span class="m">enum</span> <span class="f">{</span>
<a name="2083" /><span class="Maybe">    2083:</span>     <span class="b">FILE_CREATED</span> <span class="f">=</span> <span class="c">1</span><span class="f">,</span>
<a name="2084" /><span class="Maybe">    2084:</span>     <span class="b">FILE_OPENED</span> <span class="f">=</span> <span class="c">2</span>
<a name="2085" /><span class="Maybe">    2085:</span> <span class="f">}</span><span class="f">;</span>
<a name="2086" /><span class="Maybe">    2086:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">finish_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">dentry</span><span class="f">,</span>
<a name="2087" /><span class="Maybe">    2087:</span>             <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">open</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span>
<a name="2088" /><span class="Maybe">    2088:</span>             <span class="m">int</span> <span class="f">*</span><span class="b">opened</span><span class="f">)</span><span class="f">;</span>
<a name="2089" /><span class="Maybe">    2089:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">finish_no_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">dentry</span><span class="f">)</span><span class="f">;</span>
<a name="2090" /><span class="Maybe">    2090:</span> 
<a name="2091" /><span class="Maybe">    2091:</span> <span class="k">/* fs/ioctl.c */</span>
<a name="2092" /><span class="Maybe">    2092:</span> 
<a name="2093" /><span class="Maybe">    2093:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">ioctl_preallocate</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">argp</span><span class="f">)</span><span class="f">;</span>
<a name="2094" /><span class="Maybe">    2094:</span> 
<a name="2095" /><span class="Maybe">    2095:</span> <span class="k">/* fs/dcache.c */</span>
<a name="2096" /><span class="Maybe">    2096:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">vfs_caches_init_early</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2097" /><span class="Maybe">    2097:</span> <span class="m">extern</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">vfs_caches_init</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2098" /><span class="Maybe">    2098:</span> 
<a name="2099" /><span class="Maybe">    2099:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">kmem_cache</span> <span class="f">*</span><span class="b">names_cachep</span><span class="f">;</span>
<a name="2100" /><span class="Maybe">    2100:</span> 
<a name="2101" /><span class="Maybe">    2101:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">final_putname</span><span class="f">(</span><span class="m">struct</span> <span class="b">filename</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="2102" /><span class="Maybe">    2102:</span> 
<a name="2103" /><span class="Maybe">    2103:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19nZXRuYW1lXzA_"><span class="b">__getname</span></a><span class="f">(</span><span class="f">)</span>        <span class="b">kmem_cache_alloc</span><span class="f">(</span><span class="b">names_cachep</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_R0ZQX0tFUk5FTF8w"><span class="b">GFP_KERNEL</span></a><span class="f">)</span>
<a name="2104" /><span class="Maybe">    2104:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19wdXRuYW1lXzA_"><span class="b">__putname</span></a><span class="f">(</span><span class="b">name</span><span class="f">)</span>        <span class="b">kmem_cache_free</span><span class="f">(</span><span class="b">names_cachep</span><span class="f">,</span> <span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="b">name</span><span class="f">)</span><span class="f">)</span>
<a name="2105" /><span class="False">    2105:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0FVRElUU1lTQ0FMTF8w"><span class="b">CONFIG_AUDITSYSCALL</span></a>
<a name="2106" /><span class="False">    2106:</span> <span class="f">#</span><span class="n">define</span> <span class="b">putname</span><span class="f">(</span><span class="b">name</span><span class="f">)</span>        <span class="b">final_putname</span><span class="f">(</span><span class="b">name</span><span class="f">)</span>
<a name="2107" /><span class="Maybe">    2107:</span> <span class="f">#</span><span class="n">else</span>
<a name="2108" /><span class="Maybe">    2108:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">putname</span><span class="f">(</span><span class="m">struct</span> <span class="b">filename</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="2109" /><span class="Maybe">    2109:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2110" /><span class="Maybe">    2110:</span> 
<a name="2111" /><span class="Maybe">    2111:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2112" /><span class="Maybe">    2112:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">register_blkdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2113" /><span class="Maybe">    2113:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">unregister_blkdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2114" /><span class="Maybe">    2114:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdget</span><span class="f">(</span><span class="b">dev_t</span><span class="f">)</span><span class="f">;</span>
<a name="2115" /><span class="Maybe">    2115:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdgrab</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span><span class="f">;</span>
<a name="2116" /><span class="Maybe">    2116:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">bd_set_size</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="2117" /><span class="Maybe">    2117:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">bd_forget</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2118" /><span class="Maybe">    2118:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">bdput</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2119" /><span class="Maybe">    2119:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">invalidate_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2120" /><span class="Maybe">    2120:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">iterate_bdevs</span><span class="f">(</span><span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2121" /><span class="Maybe">    2121:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sync_blockdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span><span class="f">;</span>
<a name="2122" /><span class="Maybe">    2122:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">kill_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2123" /><span class="Maybe">    2123:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">freeze_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2124" /><span class="Maybe">    2124:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">emergency_thaw_all</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2125" /><span class="Maybe">    2125:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">thaw_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="2126" /><span class="Maybe">    2126:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">fsync_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2127" /><span class="Maybe">    2127:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sb_is_blkdev_sb</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="2128" /><span class="False">    2128:</span> <span class="f">#</span><span class="n">else</span>
<a name="2129" /><span class="False">    2129:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">bd_forget</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2130" /><span class="False">    2130:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sync_blockdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span> <span class="f">{</span> <span class="m">return</span> <span class="c">0</span><span class="f">;</span> <span class="f">}</span>
<a name="2131" /><span class="False">    2131:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">kill_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2132" /><span class="False">    2132:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">invalidate_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span> <span class="f">{</span><span class="f">}</span>
<a name="2133" /><span class="False">    2133:</span> 
<a name="2134" /><span class="False">    2134:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">freeze_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="2135" /><span class="False">    2135:</span> <span class="f">{</span>
<a name="2136" /><span class="False">    2136:</span>     <span class="m">return</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2137" /><span class="False">    2137:</span> <span class="f">}</span>
<a name="2138" /><span class="False">    2138:</span> 
<a name="2139" /><span class="False">    2139:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">thaw_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="2140" /><span class="False">    2140:</span> <span class="f">{</span>
<a name="2141" /><span class="False">    2141:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2142" /><span class="False">    2142:</span> <span class="f">}</span>
<a name="2143" /><span class="False">    2143:</span> 
<a name="2144" /><span class="False">    2144:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">iterate_bdevs</span><span class="f">(</span><span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="b">f</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">arg</span><span class="f">)</span>
<a name="2145" /><span class="False">    2145:</span> <span class="f">{</span>
<a name="2146" /><span class="False">    2146:</span> <span class="f">}</span>
<a name="2147" /><span class="False">    2147:</span> 
<a name="2148" /><span class="False">    2148:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">sb_is_blkdev_sb</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span>
<a name="2149" /><span class="False">    2149:</span> <span class="f">{</span>
<a name="2150" /><span class="False">    2150:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2151" /><span class="False">    2151:</span> <span class="f">}</span>
<a name="2152" /><span class="Maybe">    2152:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2153" /><span class="Maybe">    2153:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sync_filesystem</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2154" /><span class="Maybe">    2154:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">def_blk_fops</span><span class="f">;</span>
<a name="2155" /><span class="Maybe">    2155:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">def_chr_fops</span><span class="f">;</span>
<a name="2156" /><span class="Maybe">    2156:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">bad_sock_fops</span><span class="f">;</span>
<a name="2157" /><span class="Maybe">    2157:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2158" /><span class="Maybe">    2158:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">ioctl_by_bdev</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2159" /><span class="Maybe">    2159:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">blkdev_ioctl</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="b">fmode_t</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2160" /><span class="Maybe">    2160:</span> <span class="m">extern</span> <span class="m">long</span> <span class="b">compat_blkdev_ioctl</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2161" /><span class="Maybe">    2161:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">blkdev_get</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="b">fmode_t</span> <span class="b">mode</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">holder</span><span class="f">)</span><span class="f">;</span>
<a name="2162" /><span class="Maybe">    2162:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">blkdev_get_by_path</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">path</span><span class="f">,</span> <span class="b">fmode_t</span> <span class="b">mode</span><span class="f">,</span>
<a name="2163" /><span class="Maybe">    2163:</span>                            <span class="m">void</span> <span class="f">*</span><span class="b">holder</span><span class="f">)</span><span class="f">;</span>
<a name="2164" /><span class="Maybe">    2164:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">blkdev_get_by_dev</span><span class="f">(</span><span class="b">dev_t</span> <span class="b">dev</span><span class="f">,</span> <span class="b">fmode_t</span> <span class="b">mode</span><span class="f">,</span>
<a name="2165" /><span class="Maybe">    2165:</span>                           <span class="m">void</span> <span class="f">*</span><span class="b">holder</span><span class="f">)</span><span class="f">;</span>
<a name="2166" /><span class="Maybe">    2166:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">blkdev_put</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="b">fmode_t</span> <span class="b">mode</span><span class="f">)</span><span class="f">;</span>
<a name="2167" /><span class="Maybe">    2167:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1NZU0ZTXzA_"><span class="b">CONFIG_SYSFS</span></a>
<a name="2168" /><span class="Maybe">    2168:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">bd_link_disk_holder</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="b">disk</span><span class="f">)</span><span class="f">;</span>
<a name="2169" /><span class="Maybe">    2169:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">bd_unlink_disk_holder</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span>
<a name="2170" /><span class="Maybe">    2170:</span>                   <span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="b">disk</span><span class="f">)</span><span class="f">;</span>
<a name="2171" /><span class="False">    2171:</span> <span class="f">#</span><span class="n">else</span>
<a name="2172" /><span class="False">    2172:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">bd_link_disk_holder</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span>
<a name="2173" /><span class="False">    2173:</span>                       <span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="b">disk</span><span class="f">)</span>
<a name="2174" /><span class="False">    2174:</span> <span class="f">{</span>
<a name="2175" /><span class="False">    2175:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2176" /><span class="False">    2176:</span> <span class="f">}</span>
<a name="2177" /><span class="False">    2177:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">bd_unlink_disk_holder</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span>
<a name="2178" /><span class="False">    2178:</span>                      <span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="b">disk</span><span class="f">)</span>
<a name="2179" /><span class="False">    2179:</span> <span class="f">{</span>
<a name="2180" /><span class="False">    2180:</span> <span class="f">}</span>
<a name="2181" /><span class="Maybe">    2181:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2182" /><span class="Maybe">    2182:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2183" /><span class="Maybe">    2183:</span> 
<a name="2184" /><span class="Maybe">    2184:</span> <span class="k">/* fs/char_dev.c */</span>
<a name="2185" /><span class="Maybe">    2185:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_Q0hSREVWX01BSk9SX0hBU0hfU0laRV8w"><span class="b">CHRDEV_MAJOR_HASH_SIZE</span></a>    <span class="c">255</span>
<a name="2186" /><span class="Maybe">    2186:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">alloc_chrdev_region</span><span class="f">(</span><span class="b">dev_t</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2187" /><span class="Maybe">    2187:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">register_chrdev_region</span><span class="f">(</span><span class="b">dev_t</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2188" /><span class="Maybe">    2188:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__register_chrdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">major</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">baseminor</span><span class="f">,</span>
<a name="2189" /><span class="Maybe">    2189:</span>                  <span class="m">unsigned</span> <span class="m">int</span> <span class="b">count</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="2190" /><span class="Maybe">    2190:</span>                  <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="f">*</span><span class="b">fops</span><span class="f">)</span><span class="f">;</span>
<a name="2191" /><span class="Maybe">    2191:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__unregister_chrdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">major</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">baseminor</span><span class="f">,</span>
<a name="2192" /><span class="Maybe">    2192:</span>                 <span class="m">unsigned</span> <span class="m">int</span> <span class="b">count</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="2193" /><span class="Maybe">    2193:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">unregister_chrdev_region</span><span class="f">(</span><span class="b">dev_t</span><span class="f">,</span> <span class="m">unsigned</span><span class="f">)</span><span class="f">;</span>
<a name="2194" /><span class="Maybe">    2194:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">chrdev_show</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span><span class="b">off_t</span><span class="f">)</span><span class="f">;</span>
<a name="2195" /><span class="Maybe">    2195:</span> 
<a name="2196" /><span class="Maybe">    2196:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">register_chrdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">major</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span>
<a name="2197" /><span class="Maybe">    2197:</span>                   <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="f">*</span><span class="b">fops</span><span class="f">)</span>
<a name="2198" /><span class="Maybe">    2198:</span> <span class="f">{</span>
<a name="2199" /><span class="Maybe">    2199:</span>     <span class="m">return</span> <span class="b">__register_chrdev</span><span class="f">(</span><span class="b">major</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">256</span><span class="f">,</span> <span class="b">name</span><span class="f">,</span> <span class="b">fops</span><span class="f">)</span><span class="f">;</span>
<a name="2200" /><span class="Maybe">    2200:</span> <span class="f">}</span>
<a name="2201" /><span class="Maybe">    2201:</span> 
<a name="2202" /><span class="Maybe">    2202:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">unregister_chrdev</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span> <span class="b">major</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span>
<a name="2203" /><span class="Maybe">    2203:</span> <span class="f">{</span>
<a name="2204" /><span class="Maybe">    2204:</span>     <span class="b">__unregister_chrdev</span><span class="f">(</span><span class="b">major</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">256</span><span class="f">,</span> <span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="2205" /><span class="Maybe">    2205:</span> <span class="f">}</span>
<a name="2206" /><span class="Maybe">    2206:</span> 
<a name="2207" /><span class="Maybe">    2207:</span> <span class="k">/* fs/block_dev.c */</span>
<a name="2208" /><span class="Maybe">    2208:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QkRFVk5BTUVfU0laRV8w"><span class="b">BDEVNAME_SIZE</span></a>    <span class="c">32</span>    <span class="k">/* Largest string for a blockdev identifier */</span>
<a name="2209" /><span class="Maybe">    2209:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QkRFVlRfU0laRV8w"><span class="b">BDEVT_SIZE</span></a>    <span class="c">10</span>    <span class="k">/* Largest string for MAJ:MIN for blkdev */</span>
<a name="2210" /><span class="Maybe">    2210:</span> 
<a name="2211" /><span class="Maybe">    2211:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2212" /><span class="Maybe">    2212:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QkxLREVWX01BSk9SX0hBU0hfU0laRV8w"><span class="b">BLKDEV_MAJOR_HASH_SIZE</span></a>    <span class="c">255</span>
<a name="2213" /><span class="Maybe">    2213:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">__bdevname</span><span class="f">(</span><span class="b">dev_t</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">buffer</span><span class="f">)</span><span class="f">;</span>
<a name="2214" /><span class="Maybe">    2214:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">bdevname</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">buffer</span><span class="f">)</span><span class="f">;</span>
<a name="2215" /><span class="Maybe">    2215:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">lookup_bdev</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2216" /><span class="Maybe">    2216:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">blkdev_show</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="f">,</span><span class="b">off_t</span><span class="f">)</span><span class="f">;</span>
<a name="2217" /><span class="Maybe">    2217:</span> 
<a name="2218" /><span class="False">    2218:</span> <span class="f">#</span><span class="n">else</span>
<a name="2219" /><span class="False">    2219:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QkxLREVWX01BSk9SX0hBU0hfU0laRV8w"><span class="b">BLKDEV_MAJOR_HASH_SIZE</span></a>    <span class="c">0</span>
<a name="2220" /><span class="Maybe">    2220:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2221" /><span class="Maybe">    2221:</span> 
<a name="2222" /><span class="Maybe">    2222:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">init_special_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="b">umode_t</span><span class="f">,</span> <span class="b">dev_t</span><span class="f">)</span><span class="f">;</span>
<a name="2223" /><span class="Maybe">    2223:</span> 
<a name="2224" /><span class="Maybe">    2224:</span> <span class="k">/* Invalid inode operations -- fs/bad_inode.c */</span>
<a name="2225" /><span class="Maybe">    2225:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">make_bad_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2226" /><span class="Maybe">    2226:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">is_bad_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2227" /><span class="Maybe">    2227:</span> 
<a name="2228" /><span class="Maybe">    2228:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2229" /><span class="Maybe">    2229:</span> <span class="k">/*</span>
<a name="2230" /><span class="Maybe">    2230:</span> <span class="k"> * return READ, READA, or WRITE</span>
<a name="2231" /><span class="Maybe">    2231:</span> <span class="k"> */</span>
<a name="2232" /><span class="Maybe">    2232:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_YmlvX3J3XzA_"><span class="b">bio_rw</span></a><span class="f">(</span><span class="b">bio</span><span class="f">)</span>        <span class="f">(</span><span class="f">(</span><span class="b">bio</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">bi_rw</span> <span class="f">&amp;</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_UldfTUFTS18w"><span class="b">RW_MASK</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_UldBX01BU0tfMA__"><span class="b">RWA_MASK</span></a><span class="f">)</span><span class="f">)</span>
<a name="2233" /><span class="Maybe">    2233:</span> 
<a name="2234" /><span class="Maybe">    2234:</span> <span class="k">/*</span>
<a name="2235" /><span class="Maybe">    2235:</span> <span class="k"> * return data direction, READ or WRITE</span>
<a name="2236" /><span class="Maybe">    2236:</span> <span class="k"> */</span>
<a name="2237" /><span class="Maybe">    2237:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_YmlvX2RhdGFfZGlyXzA_"><span class="b">bio_data_dir</span></a><span class="f">(</span><span class="b">bio</span><span class="f">)</span>    <span class="f">(</span><span class="f">(</span><span class="b">bio</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">bi_rw</span> <span class="f">&amp;</span> <span class="c">1</span><span class="f">)</span>
<a name="2238" /><span class="Maybe">    2238:</span> 
<a name="2239" /><span class="Maybe">    2239:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">check_disk_size_change</span><span class="f">(</span><span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="b">disk</span><span class="f">,</span>
<a name="2240" /><span class="Maybe">    2240:</span>                    <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span><span class="f">;</span>
<a name="2241" /><span class="Maybe">    2241:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">revalidate_disk</span><span class="f">(</span><span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2242" /><span class="Maybe">    2242:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">check_disk_change</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2243" /><span class="Maybe">    2243:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__invalidate_device</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="m">bool</span><span class="f">)</span><span class="f">;</span>
<a name="2244" /><span class="Maybe">    2244:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">invalidate_partition</span><span class="f">(</span><span class="m">struct</span> <span class="b">gendisk</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2245" /><span class="Maybe">    2245:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2246" /><span class="Maybe">    2246:</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">invalidate_mapping_pages</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2247" /><span class="Maybe">    2247:</span>                     <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">start</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">end</span><span class="f">)</span><span class="f">;</span>
<a name="2248" /><span class="Maybe">    2248:</span> 
<a name="2249" /><span class="Maybe">    2249:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">invalidate_remote_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2250" /><span class="Maybe">    2250:</span> <span class="f">{</span>
<a name="2251" /><span class="Maybe">    2251:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_U19JU1JFR18w"><span class="b">S_ISREG</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span> <span class="f">||</span> <a href="cpu.c_macros_ref.html#_U19JU0RJUl8w"><span class="b">S_ISDIR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span> <span class="f">||</span>
<a name="2252" /><span class="Maybe">    2252:</span>         <a href="cpu.c_macros_ref.html#_U19JU0xOS18w"><span class="b">S_ISLNK</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span><span class="f">)</span>
<a name="2253" /><span class="Maybe">    2253:</span>         <span class="b">invalidate_mapping_pages</span><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mapping</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2254" /><span class="Maybe">    2254:</span> <span class="f">}</span>
<a name="2255" /><span class="Maybe">    2255:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">invalidate_inode_pages2</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span><span class="f">;</span>
<a name="2256" /><span class="Maybe">    2256:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">invalidate_inode_pages2_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2257" /><span class="Maybe">    2257:</span>                      <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">start</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">end</span><span class="f">)</span><span class="f">;</span>
<a name="2258" /><span class="Maybe">    2258:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">write_inode_now</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2259" /><span class="Maybe">    2259:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_fdatawrite</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2260" /><span class="Maybe">    2260:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_flush</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2261" /><span class="Maybe">    2261:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_fdatawait</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2262" /><span class="Maybe">    2262:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_fdatawait_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">lstart</span><span class="f">,</span>
<a name="2263" /><span class="Maybe">    2263:</span>                    <span class="b">loff_t</span> <span class="b">lend</span><span class="f">)</span><span class="f">;</span>
<a name="2264" /><span class="Maybe">    2264:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_write_and_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span><span class="f">;</span>
<a name="2265" /><span class="Maybe">    2265:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_write_and_wait_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2266" /><span class="Maybe">    2266:</span>                         <span class="b">loff_t</span> <span class="b">lstart</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">lend</span><span class="f">)</span><span class="f">;</span>
<a name="2267" /><span class="Maybe">    2267:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__filemap_fdatawrite_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2268" /><span class="Maybe">    2268:</span>                 <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">end</span><span class="f">,</span> <span class="m">int</span> <span class="b">sync_mode</span><span class="f">)</span><span class="f">;</span>
<a name="2269" /><span class="Maybe">    2269:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">filemap_fdatawrite_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2270" /><span class="Maybe">    2270:</span>                 <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">end</span><span class="f">)</span><span class="f">;</span>
<a name="2271" /><span class="Maybe">    2271:</span> 
<a name="2272" /><span class="Maybe">    2272:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_fsync_range</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">end</span><span class="f">,</span>
<a name="2273" /><span class="Maybe">    2273:</span>                <span class="m">int</span> <span class="b">datasync</span><span class="f">)</span><span class="f">;</span>
<a name="2274" /><span class="Maybe">    2274:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_fsync</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">int</span> <span class="b">datasync</span><span class="f">)</span><span class="f">;</span>
<a name="2275" /><span class="Maybe">    2275:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_write_sync</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="2276" /><span class="Maybe">    2276:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">emergency_sync</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2277" /><span class="Maybe">    2277:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">emergency_remount</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2278" /><span class="Maybe">    2278:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2279" /><span class="Maybe">    2279:</span> <span class="m">extern</span> <span class="b">sector_t</span> <span class="b">bmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="b">sector_t</span><span class="f">)</span><span class="f">;</span>
<a name="2280" /><span class="Maybe">    2280:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2281" /><span class="Maybe">    2281:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">notify_change</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2282" /><span class="Maybe">    2282:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">inode_permission</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2283" /><span class="Maybe">    2283:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_permission</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2284" /><span class="Maybe">    2284:</span> 
<a name="2285" /><span class="Maybe">    2285:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">execute_ok</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2286" /><span class="Maybe">    2286:</span> <span class="f">{</span>
<a name="2287" /><span class="Maybe">    2287:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19JWFVHT18w"><span class="b">S_IXUGO</span></a><span class="f">)</span> <span class="f">||</span> <a href="cpu.c_macros_ref.html#_U19JU0RJUl8w"><span class="b">S_ISDIR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span><span class="f">;</span>
<a name="2288" /><span class="Maybe">    2288:</span> <span class="f">}</span>
<a name="2289" /><span class="Maybe">    2289:</span> 
<a name="2290" /><span class="Maybe">    2290:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">file_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">f</span><span class="f">)</span>
<a name="2291" /><span class="Maybe">    2291:</span> <span class="f">{</span>
<a name="2292" /><span class="Maybe">    2292:</span>     <span class="m">return</span> <span class="b">f</span><span class="f">-&gt;</span><span class="b">f_inode</span><span class="f">;</span>
<a name="2293" /><span class="Maybe">    2293:</span> <span class="f">}</span>
<a name="2294" /><span class="Maybe">    2294:</span> 
<a name="2295" /><span class="Maybe">    2295:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_start_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="2296" /><span class="Maybe">    2296:</span> <span class="f">{</span>
<a name="2297" /><span class="Maybe">    2297:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="cpu.c_macros_ref.html#_U19JU1JFR18w"><span class="b">S_ISREG</span></a><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span><span class="f">)</span>
<a name="2298" /><span class="Maybe">    2298:</span>         <span class="m">return</span><span class="f">;</span>
<a name="2299" /><span class="Maybe">    2299:</span>     <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">,</span> <span class="m">true</span><span class="f">)</span><span class="f">;</span>
<a name="2300" /><span class="Maybe">    2300:</span> <span class="f">}</span>
<a name="2301" /><span class="Maybe">    2301:</span> 
<a name="2302" /><span class="Maybe">    2302:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">file_start_write_trylock</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="2303" /><span class="Maybe">    2303:</span> <span class="f">{</span>
<a name="2304" /><span class="Maybe">    2304:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="cpu.c_macros_ref.html#_U19JU1JFR18w"><span class="b">S_ISREG</span></a><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span><span class="f">)</span>
<a name="2305" /><span class="Maybe">    2305:</span>         <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="2306" /><span class="Maybe">    2306:</span>     <span class="m">return</span> <span class="b">__sb_start_write</span><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">,</span> <span class="m">false</span><span class="f">)</span><span class="f">;</span>
<a name="2307" /><span class="Maybe">    2307:</span> <span class="f">}</span>
<a name="2308" /><span class="Maybe">    2308:</span> 
<a name="2309" /><span class="Maybe">    2309:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">file_end_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="2310" /><span class="Maybe">    2310:</span> <span class="f">{</span>
<a name="2311" /><span class="Maybe">    2311:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="cpu.c_macros_ref.html#_U19JU1JFR18w"><span class="b">S_ISREG</span></a><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span><span class="f">)</span>
<a name="2312" /><span class="Maybe">    2312:</span>         <span class="m">return</span><span class="f">;</span>
<a name="2313" /><span class="Maybe">    2313:</span>     <span class="b">__sb_end_write</span><span class="f">(</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">,</span> <span class="b">SB_FREEZE_WRITE</span><span class="f">)</span><span class="f">;</span>
<a name="2314" /><span class="Maybe">    2314:</span> <span class="f">}</span>
<a name="2315" /><span class="Maybe">    2315:</span> 
<a name="2316" /><span class="Maybe">    2316:</span> <span class="k">/*</span>
<a name="2317" /><span class="Maybe">    2317:</span> <span class="k"> * get_write_access() gets write permission for a file.</span>
<a name="2318" /><span class="Maybe">    2318:</span> <span class="k"> * put_write_access() releases this write permission.</span>
<a name="2319" /><span class="Maybe">    2319:</span> <span class="k"> * This is used for regular files.</span>
<a name="2320" /><span class="Maybe">    2320:</span> <span class="k"> * We cannot support write (and maybe mmap read-write shared) accesses and</span>
<a name="2321" /><span class="Maybe">    2321:</span> <span class="k"> * MAP_DENYWRITE mmappings simultaneously. The i_writecount field of an inode</span>
<a name="2322" /><span class="Maybe">    2322:</span> <span class="k"> * can have the following values:</span>
<a name="2323" /><span class="Maybe">    2323:</span> <span class="k"> * 0: no writers, no VM_DENYWRITE mappings</span>
<a name="2324" /><span class="Maybe">    2324:</span> <span class="k"> * &lt; 0: (-i_writecount) vm_area_structs with VM_DENYWRITE set exist</span>
<a name="2325" /><span class="Maybe">    2325:</span> <span class="k"> * &gt; 0: (i_writecount) users are writing to the file.</span>
<a name="2326" /><span class="Maybe">    2326:</span> <span class="k"> *</span>
<a name="2327" /><span class="Maybe">    2327:</span> <span class="k"> * Normally we operate on that counter with atomic_{inc,dec} and it&apos;s safe</span>
<a name="2328" /><span class="Maybe">    2328:</span> <span class="k"> * except for the cases where we don&apos;t hold i_writecount yet. Then we need to</span>
<a name="2329" /><span class="Maybe">    2329:</span> <span class="k"> * use {get,deny}_write_access() - these functions check the sign and refuse</span>
<a name="2330" /><span class="Maybe">    2330:</span> <span class="k"> * to do the change if sign is wrong.</span>
<a name="2331" /><span class="Maybe">    2331:</span> <span class="k"> */</span>
<a name="2332" /><span class="Maybe">    2332:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">get_write_access</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2333" /><span class="Maybe">    2333:</span> <span class="f">{</span>
<a name="2334" /><span class="Maybe">    2334:</span>     <span class="m">return</span> <span class="b">atomic_inc_unless_negative</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_writecount</span><span class="f">)</span> <span class="f">?</span> <span class="c">0</span> <span class="f">:</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RVRYVEJTWV8w"><span class="b">ETXTBSY</span></a><span class="f">;</span>
<a name="2335" /><span class="Maybe">    2335:</span> <span class="f">}</span>
<a name="2336" /><span class="Maybe">    2336:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">deny_write_access</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="2337" /><span class="Maybe">    2337:</span> <span class="f">{</span>
<a name="2338" /><span class="Maybe">    2338:</span>     <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span> <span class="f">=</span> <span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="2339" /><span class="Maybe">    2339:</span>     <span class="m">return</span> <span class="b">atomic_dec_unless_positive</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_writecount</span><span class="f">)</span> <span class="f">?</span> <span class="c">0</span> <span class="f">:</span> <span class="f">-</span><a href="cpu.c_macros_ref.html#_RVRYVEJTWV8w"><span class="b">ETXTBSY</span></a><span class="f">;</span>
<a name="2340" /><span class="Maybe">    2340:</span> <span class="f">}</span>
<a name="2341" /><span class="Maybe">    2341:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">put_write_access</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">inode</span><span class="f">)</span>
<a name="2342" /><span class="Maybe">    2342:</span> <span class="f">{</span>
<a name="2343" /><span class="Maybe">    2343:</span>     <span class="b">atomic_dec</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_writecount</span><span class="f">)</span><span class="f">;</span>
<a name="2344" /><span class="Maybe">    2344:</span> <span class="f">}</span>
<a name="2345" /><span class="Maybe">    2345:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">allow_write_access</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>
<a name="2346" /><span class="Maybe">    2346:</span> <span class="f">{</span>
<a name="2347" /><span class="Maybe">    2347:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">file</span><span class="f">)</span>
<a name="2348" /><span class="Maybe">    2348:</span>         <span class="b">atomic_inc</span><span class="f">(</span><span class="f">&amp;</span><span class="b">file_inode</span><span class="f">(</span><span class="b">file</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">i_writecount</span><span class="f">)</span><span class="f">;</span>
<a name="2349" /><span class="Maybe">    2349:</span> <span class="f">}</span>
<a name="2350" /><span class="Maybe">    2350:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">inode_is_open_for_write</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2351" /><span class="Maybe">    2351:</span> <span class="f">{</span>
<a name="2352" /><span class="Maybe">    2352:</span>     <span class="m">return</span> <span class="b">atomic_read</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_writecount</span><span class="f">)</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">;</span>
<a name="2353" /><span class="Maybe">    2353:</span> <span class="f">}</span>
<a name="2354" /><span class="Maybe">    2354:</span> 
<a name="2355" /><span class="Maybe">    2355:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0lNQV8w"><span class="b">CONFIG_IMA</span></a>
<a name="2356" /><span class="Maybe">    2356:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_readcount_dec</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2357" /><span class="Maybe">    2357:</span> <span class="f">{</span>
<a name="2358" /><span class="Maybe">    2358:</span>     <a href="cpu.c_macros_ref.html#_QlVHX09OXzA_"><span class="b">BUG_ON</span></a><span class="f">(</span><span class="f">!</span><span class="b">atomic_read</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_readcount</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2359" /><span class="Maybe">    2359:</span>     <span class="b">atomic_dec</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_readcount</span><span class="f">)</span><span class="f">;</span>
<a name="2360" /><span class="Maybe">    2360:</span> <span class="f">}</span>
<a name="2361" /><span class="Maybe">    2361:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_readcount_inc</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2362" /><span class="Maybe">    2362:</span> <span class="f">{</span>
<a name="2363" /><span class="Maybe">    2363:</span>     <span class="b">atomic_inc</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_readcount</span><span class="f">)</span><span class="f">;</span>
<a name="2364" /><span class="Maybe">    2364:</span> <span class="f">}</span>
<a name="2365" /><span class="False">    2365:</span> <span class="f">#</span><span class="n">else</span>
<a name="2366" /><span class="False">    2366:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_readcount_dec</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2367" /><span class="False">    2367:</span> <span class="f">{</span>
<a name="2368" /><span class="False">    2368:</span>     <span class="m">return</span><span class="f">;</span>
<a name="2369" /><span class="False">    2369:</span> <span class="f">}</span>
<a name="2370" /><span class="False">    2370:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">i_readcount_inc</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2371" /><span class="False">    2371:</span> <span class="f">{</span>
<a name="2372" /><span class="False">    2372:</span>     <span class="m">return</span><span class="f">;</span>
<a name="2373" /><span class="False">    2373:</span> <span class="f">}</span>
<a name="2374" /><span class="Maybe">    2374:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2375" /><span class="Maybe">    2375:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_pipe_flags</span><span class="f">(</span><span class="m">int</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2376" /><span class="Maybe">    2376:</span> 
<a name="2377" /><span class="Maybe">    2377:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kernel_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2378" /><span class="Maybe">    2378:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">kernel_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="2379" /><span class="Maybe">    2379:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span> <span class="b">open_exec</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2380" /><span class="Maybe">    2380:</span>  
<a name="2381" /><span class="Maybe">    2381:</span> <span class="k">/* fs/dcache.c -- generic fs support functions */</span>
<a name="2382" /><span class="Maybe">    2382:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">is_subdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2383" /><span class="Maybe">    2383:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">path_is_under</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2384" /><span class="Maybe">    2384:</span> 
<a name="2385" /><span class="Maybe">    2385:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">err</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="2386" /><span class="Maybe">    2386:</span> 
<a name="2387" /><span class="Maybe">    2387:</span> <span class="k">/* needed for stackable file system support */</span>
<a name="2388" /><span class="Maybe">    2388:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">default_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">whence</span><span class="f">)</span><span class="f">;</span>
<a name="2389" /><span class="Maybe">    2389:</span> 
<a name="2390" /><span class="Maybe">    2390:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">vfs_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">whence</span><span class="f">)</span><span class="f">;</span>
<a name="2391" /><span class="Maybe">    2391:</span> 
<a name="2392" /><span class="Maybe">    2392:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">inode_init_always</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2393" /><span class="Maybe">    2393:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">inode_init_once</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2394" /><span class="Maybe">    2394:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">address_space_init_once</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span><span class="f">;</span>
<a name="2395" /><span class="Maybe">    2395:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">igrab</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2396" /><span class="Maybe">    2396:</span> <span class="m">extern</span> <span class="b">ino_t</span> <span class="b">iunique</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="b">ino_t</span><span class="f">)</span><span class="f">;</span>
<a name="2397" /><span class="Maybe">    2397:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">inode_needs_sync</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2398" /><span class="Maybe">    2398:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_delete_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2399" /><span class="Maybe">    2399:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">generic_drop_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2400" /><span class="Maybe">    2400:</span> <span class="f">{</span>
<a name="2401" /><span class="Maybe">    2401:</span>     <span class="m">return</span> <span class="f">!</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_nlink</span> <span class="f">||</span> <span class="b">inode_unhashed</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2402" /><span class="Maybe">    2402:</span> <span class="f">}</span>
<a name="2403" /><span class="Maybe">    2403:</span> 
<a name="2404" /><span class="Maybe">    2404:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">ilookup5_nowait</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span>
<a name="2405" /><span class="Maybe">    2405:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="b">hashval</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">test</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span>
<a name="2406" /><span class="Maybe">    2406:</span>         <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">)</span><span class="f">;</span>
<a name="2407" /><span class="Maybe">    2407:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">ilookup5</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">hashval</span><span class="f">,</span>
<a name="2408" /><span class="Maybe">    2408:</span>         <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">test</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">data</span><span class="f">)</span><span class="f">;</span>
<a name="2409" /><span class="Maybe">    2409:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">ilookup</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">ino</span><span class="f">)</span><span class="f">;</span>
<a name="2410" /><span class="Maybe">    2410:</span> 
<a name="2411" /><span class="Maybe">    2411:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">iget5_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">test</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">set</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2412" /><span class="Maybe">    2412:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">iget_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">)</span><span class="f">;</span>
<a name="2413" /><span class="Maybe">    2413:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">insert_inode_locked4</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">test</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2414" /><span class="Maybe">    2414:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">insert_inode_locked</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2415" /><span class="False">    2415:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_DEBUG_LOCK_ALLOC</span>
<a name="2416" /><span class="False">    2416:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">lockdep_annotate_inode_mutex_key</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2417" /><span class="Maybe">    2417:</span> <span class="f">#</span><span class="n">else</span>
<a name="2418" /><span class="Maybe">    2418:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">lockdep_annotate_inode_mutex_key</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span><span class="f">;</span>
<a name="2419" /><span class="Maybe">    2419:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2420" /><span class="Maybe">    2420:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">unlock_new_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2421" /><span class="Maybe">    2421:</span> <span class="m">extern</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">get_next_ino</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="2422" /><span class="Maybe">    2422:</span> 
<a name="2423" /><span class="Maybe">    2423:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__iget</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2424" /><span class="Maybe">    2424:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">iget_failed</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2425" /><span class="Maybe">    2425:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">clear_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2426" /><span class="Maybe">    2426:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__destroy_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2427" /><span class="Maybe">    2427:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">new_inode_pseudo</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="2428" /><span class="Maybe">    2428:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">new_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="2429" /><span class="Maybe">    2429:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">free_inode_nonrcu</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2430" /><span class="Maybe">    2430:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">should_remove_suid</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2431" /><span class="Maybe">    2431:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">file_remove_suid</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2432" /><span class="Maybe">    2432:</span> 
<a name="2433" /><span class="Maybe">    2433:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__insert_inode_hash</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">hashval</span><span class="f">)</span><span class="f">;</span>
<a name="2434" /><span class="Maybe">    2434:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">insert_inode_hash</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2435" /><span class="Maybe">    2435:</span> <span class="f">{</span>
<a name="2436" /><span class="Maybe">    2436:</span>     <span class="b">__insert_inode_hash</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_ino</span><span class="f">)</span><span class="f">;</span>
<a name="2437" /><span class="Maybe">    2437:</span> <span class="f">}</span>
<a name="2438" /><span class="Maybe">    2438:</span> 
<a name="2439" /><span class="Maybe">    2439:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">__remove_inode_hash</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2440" /><span class="Maybe">    2440:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">remove_inode_hash</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2441" /><span class="Maybe">    2441:</span> <span class="f">{</span>
<a name="2442" /><span class="Maybe">    2442:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">inode_unhashed</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">)</span>
<a name="2443" /><span class="Maybe">    2443:</span>         <span class="b">__remove_inode_hash</span><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2444" /><span class="Maybe">    2444:</span> <span class="f">}</span>
<a name="2445" /><span class="Maybe">    2445:</span> 
<a name="2446" /><span class="Maybe">    2446:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">inode_sb_list_add</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2447" /><span class="Maybe">    2447:</span> 
<a name="2448" /><span class="Maybe">    2448:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2449" /><span class="Maybe">    2449:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">submit_bio</span><span class="f">(</span><span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">bio</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2450" /><span class="Maybe">    2450:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">bdev_read_only</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2451" /><span class="Maybe">    2451:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2452" /><span class="Maybe">    2452:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">set_blocksize</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2453" /><span class="Maybe">    2453:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sb_set_blocksize</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2454" /><span class="Maybe">    2454:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">sb_min_blocksize</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2455" /><span class="Maybe">    2455:</span> 
<a name="2456" /><span class="Maybe">    2456:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_file_mmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2457" /><span class="Maybe">    2457:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_file_readonly_mmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2458" /><span class="Maybe">    2458:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_file_remap_pages</span><span class="f">(</span><span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">addr</span><span class="f">,</span>
<a name="2459" /><span class="Maybe">    2459:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="b">size</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_cGdvZmZfdF8w"><span class="b">pgoff_t</span></a> <span class="b">pgoff</span><span class="f">)</span><span class="f">;</span>
<a name="2460" /><span class="Maybe">    2460:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">file_read_actor</span><span class="f">(</span><span class="b">read_descriptor_t</span> <span class="f">*</span> <span class="b">desc</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">offset</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="2461" /><span class="Maybe">    2461:</span> <span class="m">int</span> <span class="b">generic_write_checks</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">pos</span><span class="f">,</span> <span class="b">size_t</span> <span class="f">*</span><span class="b">count</span><span class="f">,</span> <span class="m">int</span> <span class="b">isblk</span><span class="f">)</span><span class="f">;</span>
<a name="2462" /><span class="Maybe">    2462:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_aio_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="2463" /><span class="Maybe">    2463:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">__generic_file_aio_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span>
<a name="2464" /><span class="Maybe">    2464:</span>         <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2465" /><span class="Maybe">    2465:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_aio_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">)</span><span class="f">;</span>
<a name="2466" /><span class="Maybe">    2466:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_direct_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span>
<a name="2467" /><span class="Maybe">    2467:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">size_t</span><span class="f">)</span><span class="f">;</span>
<a name="2468" /><span class="Maybe">    2468:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_buffered_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="f">,</span>
<a name="2469" /><span class="Maybe">    2469:</span>         <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">ssize_t</span><span class="f">)</span><span class="f">;</span>
<a name="2470" /><span class="Maybe">    2470:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">do_sync_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2471" /><span class="Maybe">    2471:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">do_sync_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2472" /><span class="Maybe">    2472:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_segment_checks</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span>
<a name="2473" /><span class="Maybe">    2473:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">nr_segs</span><span class="f">,</span> <span class="b">size_t</span> <span class="f">*</span><span class="b">count</span><span class="f">,</span> <span class="m">int</span> <span class="b">access_flags</span><span class="f">)</span><span class="f">;</span>
<a name="2474" /><span class="Maybe">    2474:</span> 
<a name="2475" /><span class="Maybe">    2475:</span> <span class="k">/* fs/block_dev.c */</span>
<a name="2476" /><span class="Maybe">    2476:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">blkdev_aio_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="b">iocb</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span>
<a name="2477" /><span class="Maybe">    2477:</span>                 <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">pos</span><span class="f">)</span><span class="f">;</span>
<a name="2478" /><span class="Maybe">    2478:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">blkdev_fsync</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">end</span><span class="f">,</span>
<a name="2479" /><span class="Maybe">    2479:</span>             <span class="m">int</span> <span class="b">datasync</span><span class="f">)</span><span class="f">;</span>
<a name="2480" /><span class="Maybe">    2480:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">block_sync_page</span><span class="f">(</span><span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">)</span><span class="f">;</span>
<a name="2481" /><span class="Maybe">    2481:</span> 
<a name="2482" /><span class="Maybe">    2482:</span> <span class="k">/* fs/splice.c */</span>
<a name="2483" /><span class="Maybe">    2483:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_splice_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span>
<a name="2484" /><span class="Maybe">    2484:</span>         <span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2485" /><span class="Maybe">    2485:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">default_file_splice_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span>
<a name="2486" /><span class="Maybe">    2486:</span>         <span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2487" /><span class="Maybe">    2487:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_file_splice_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="f">,</span>
<a name="2488" /><span class="Maybe">    2488:</span>         <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2489" /><span class="Maybe">    2489:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_splice_sendpage</span><span class="f">(</span><span class="m">struct</span> <span class="b">pipe_inode_info</span> <span class="f">*</span><span class="b">pipe</span><span class="f">,</span>
<a name="2490" /><span class="Maybe">    2490:</span>         <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">out</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2491" /><span class="Maybe">    2491:</span> 
<a name="2492" /><span class="Maybe">    2492:</span> <span class="m">extern</span> <span class="m">void</span>
<a name="2493" /><span class="Maybe">    2493:</span> <span class="b">file_ra_state_init</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_ra_state</span> <span class="f">*</span><span class="b">ra</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">)</span><span class="f">;</span>
<a name="2494" /><span class="Maybe">    2494:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">noop_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">whence</span><span class="f">)</span><span class="f">;</span>
<a name="2495" /><span class="Maybe">    2495:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">no_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">whence</span><span class="f">)</span><span class="f">;</span>
<a name="2496" /><span class="Maybe">    2496:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">vfs_setpos</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">maxsize</span><span class="f">)</span><span class="f">;</span>
<a name="2497" /><span class="Maybe">    2497:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">generic_file_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span> <span class="m">int</span> <span class="b">whence</span><span class="f">)</span><span class="f">;</span>
<a name="2498" /><span class="Maybe">    2498:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">generic_file_llseek_size</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2499" /><span class="Maybe">    2499:</span>         <span class="m">int</span> <span class="b">whence</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">maxsize</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">eof</span><span class="f">)</span><span class="f">;</span>
<a name="2500" /><span class="Maybe">    2500:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">fixed_size_llseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2501" /><span class="Maybe">    2501:</span>         <span class="m">int</span> <span class="b">whence</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="2502" /><span class="Maybe">    2502:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_file_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span> <span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="2503" /><span class="Maybe">    2503:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">nonseekable_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span> <span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span> <span class="b">filp</span><span class="f">)</span><span class="f">;</span>
<a name="2504" /><span class="Maybe">    2504:</span> 
<a name="2505" /><span class="False">    2505:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_FS_XIP</span>
<a name="2506" /><span class="False">    2506:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">xip_file_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span>
<a name="2507" /><span class="False">    2507:</span>                  <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2508" /><span class="False">    2508:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">xip_file_mmap</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span> <span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vm_area_struct</span> <span class="f">*</span> <span class="b">vma</span><span class="f">)</span><span class="f">;</span>
<a name="2509" /><span class="False">    2509:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">xip_file_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span>
<a name="2510" /><span class="False">    2510:</span>                   <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2511" /><span class="False">    2511:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">xip_truncate_page</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">from</span><span class="f">)</span><span class="f">;</span>
<a name="2512" /><span class="Maybe">    2512:</span> <span class="f">#</span><span class="n">else</span>
<a name="2513" /><span class="Maybe">    2513:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">xip_truncate_page</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">from</span><span class="f">)</span>
<a name="2514" /><span class="Maybe">    2514:</span> <span class="f">{</span>
<a name="2515" /><span class="Maybe">    2515:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2516" /><span class="Maybe">    2516:</span> <span class="f">}</span>
<a name="2517" /><span class="Maybe">    2517:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2518" /><span class="Maybe">    2518:</span> 
<a name="2519" /><span class="Maybe">    2519:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0JMT0NLXzA_"><span class="b">CONFIG_BLOCK</span></a>
<a name="2520" /><span class="Maybe">    2520:</span> <span class="m">typedef</span> <span class="m">void</span> <span class="f">(</span><span class="b">dio_submit_t</span><span class="f">)</span><span class="f">(</span><span class="m">int</span> <span class="b">rw</span><span class="f">,</span> <span class="m">struct</span> <span class="b">bio</span> <span class="f">*</span><span class="b">bio</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="2521" /><span class="Maybe">    2521:</span>                 <span class="b">loff_t</span> <span class="b">file_offset</span><span class="f">)</span><span class="f">;</span>
<a name="2522" /><span class="Maybe">    2522:</span> 
<a name="2523" /><span class="Maybe">    2523:</span> <span class="m">enum</span> <span class="f">{</span>
<a name="2524" /><span class="Maybe">    2524:</span>     <span class="k">/* need locking between buffered and direct access */</span>
<a name="2525" /><span class="Maybe">    2525:</span>     <span class="b">DIO_LOCKING</span>    <span class="f">=</span> <span class="c">0x01</span><span class="f">,</span>
<a name="2526" /><span class="Maybe">    2526:</span> 
<a name="2527" /><span class="Maybe">    2527:</span>     <span class="k">/* filesystem does not support filling holes */</span>
<a name="2528" /><span class="Maybe">    2528:</span>     <span class="b">DIO_SKIP_HOLES</span>    <span class="f">=</span> <span class="c">0x02</span><span class="f">,</span>
<a name="2529" /><span class="Maybe">    2529:</span> <span class="f">}</span><span class="f">;</span>
<a name="2530" /><span class="Maybe">    2530:</span> 
<a name="2531" /><span class="Maybe">    2531:</span> <span class="m">void</span> <span class="b">dio_end_io</span><span class="f">(</span><span class="m">struct</span> <span class="b">bio</span> <span class="f">*</span><span class="b">bio</span><span class="f">,</span> <span class="m">int</span> <span class="b">error</span><span class="f">)</span><span class="f">;</span>
<a name="2532" /><span class="Maybe">    2532:</span> 
<a name="2533" /><span class="Maybe">    2533:</span> <span class="b">ssize_t</span> <span class="b">__blockdev_direct_IO</span><span class="f">(</span><span class="m">int</span> <span class="b">rw</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="b">iocb</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="2534" /><span class="Maybe">    2534:</span>     <span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2535" /><span class="Maybe">    2535:</span>     <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">,</span> <span class="b">get_block_t</span> <span class="b">get_block</span><span class="f">,</span> <span class="b">dio_iodone_t</span> <span class="b">end_io</span><span class="f">,</span>
<a name="2536" /><span class="Maybe">    2536:</span>     <span class="b">dio_submit_t</span> <span class="b">submit_io</span><span class="f">,</span>    <span class="m">int</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2537" /><span class="Maybe">    2537:</span> 
<a name="2538" /><span class="Maybe">    2538:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">ssize_t</span> <span class="b">blockdev_direct_IO</span><span class="f">(</span><span class="m">int</span> <span class="b">rw</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kiocb</span> <span class="f">*</span><span class="b">iocb</span><span class="f">,</span>
<a name="2539" /><span class="Maybe">    2539:</span>         <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iovec</span> <span class="f">*</span><span class="b">iov</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">,</span>
<a name="2540" /><span class="Maybe">    2540:</span>         <span class="m">unsigned</span> <span class="m">long</span> <span class="b">nr_segs</span><span class="f">,</span> <span class="b">get_block_t</span> <span class="b">get_block</span><span class="f">)</span>
<a name="2541" /><span class="Maybe">    2541:</span> <span class="f">{</span>
<a name="2542" /><span class="Maybe">    2542:</span>     <span class="m">return</span> <span class="b">__blockdev_direct_IO</span><span class="f">(</span><span class="b">rw</span><span class="f">,</span> <span class="b">iocb</span><span class="f">,</span> <span class="b">inode</span><span class="f">,</span> <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">-&gt;</span><span class="b">s_bdev</span><span class="f">,</span> <span class="b">iov</span><span class="f">,</span>
<a name="2543" /><span class="Maybe">    2543:</span>                     <span class="b">offset</span><span class="f">,</span> <span class="b">nr_segs</span><span class="f">,</span> <span class="b">get_block</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>
<a name="2544" /><span class="Maybe">    2544:</span>                     <span class="b">DIO_LOCKING</span> <span class="f">|</span> <span class="b">DIO_SKIP_HOLES</span><span class="f">)</span><span class="f">;</span>
<a name="2545" /><span class="Maybe">    2545:</span> <span class="f">}</span>
<a name="2546" /><span class="Maybe">    2546:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2547" /><span class="Maybe">    2547:</span> 
<a name="2548" /><span class="Maybe">    2548:</span> <span class="m">void</span> <span class="b">inode_dio_wait</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2549" /><span class="Maybe">    2549:</span> <span class="m">void</span> <span class="b">inode_dio_done</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2550" /><span class="Maybe">    2550:</span> 
<a name="2551" /><span class="Maybe">    2551:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">generic_ro_fops</span><span class="f">;</span>
<a name="2552" /><span class="Maybe">    2552:</span> 
<a name="2553" /><span class="Maybe">    2553:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_c3BlY2lhbF9maWxlXzA_"><span class="b">special_file</span></a><span class="f">(</span><span class="b">m</span><span class="f">)</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_U19JU0NIUl8w"><span class="b">S_ISCHR</span></a><span class="f">(</span><span class="b">m</span><span class="f">)</span><span class="f">||</span><a href="cpu.c_macros_noref.html#_U19JU0JMS18w"><span class="b">S_ISBLK</span></a><span class="f">(</span><span class="b">m</span><span class="f">)</span><span class="f">||</span><a href="cpu.c_macros_noref.html#_U19JU0ZJRk9fMA__"><span class="b">S_ISFIFO</span></a><span class="f">(</span><span class="b">m</span><span class="f">)</span><span class="f">||</span><a href="cpu.c_macros_noref.html#_U19JU1NPQ0tfMA__"><span class="b">S_ISSOCK</span></a><span class="f">(</span><span class="b">m</span><span class="f">)</span><span class="f">)</span>
<a name="2554" /><span class="Maybe">    2554:</span> 
<a name="2555" /><span class="Maybe">    2555:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_readlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2556" /><span class="Maybe">    2556:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">page_readlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2557" /><span class="Maybe">    2557:</span> <span class="m">extern</span> <span class="m">void</span> <span class="f">*</span><span class="b">page_follow_link_light</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">nameidata</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2558" /><span class="Maybe">    2558:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">page_put_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">nameidata</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2559" /><span class="Maybe">    2559:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__page_symlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">symname</span><span class="f">,</span> <span class="m">int</span> <span class="b">len</span><span class="f">,</span>
<a name="2560" /><span class="Maybe">    2560:</span>         <span class="m">int</span> <span class="b">nofs</span><span class="f">)</span><span class="f">;</span>
<a name="2561" /><span class="Maybe">    2561:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">page_symlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">symname</span><span class="f">,</span> <span class="m">int</span> <span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="2562" /><span class="Maybe">    2562:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">inode_operations</span> <span class="b">page_symlink_inode_operations</span><span class="f">;</span>
<a name="2563" /><span class="Maybe">    2563:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">kfree_put_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">nameidata</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2564" /><span class="Maybe">    2564:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_readlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2565" /><span class="Maybe">    2565:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">generic_fillattr</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2566" /><span class="Maybe">    2566:</span> <span class="m">int</span> <span class="b">vfs_getattr_nosec</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="b">path</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="b">stat</span><span class="f">)</span><span class="f">;</span>
<a name="2567" /><span class="Maybe">    2567:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_getattr</span><span class="f">(</span><span class="m">struct</span> <span class="b">path</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2568" /><span class="Maybe">    2568:</span> <span class="m">void</span> <span class="b">__inode_add_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="2569" /><span class="Maybe">    2569:</span> <span class="m">void</span> <span class="b">inode_add_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="2570" /><span class="Maybe">    2570:</span> <span class="m">void</span> <span class="b">__inode_sub_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="2571" /><span class="Maybe">    2571:</span> <span class="m">void</span> <span class="b">inode_sub_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="2572" /><span class="Maybe">    2572:</span> <span class="b">loff_t</span> <span class="b">inode_get_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2573" /><span class="Maybe">    2573:</span> <span class="m">void</span> <span class="b">inode_set_bytes</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">bytes</span><span class="f">)</span><span class="f">;</span>
<a name="2574" /><span class="Maybe">    2574:</span> 
<a name="2575" /><span class="Maybe">    2575:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_readdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">filldir_t</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2576" /><span class="Maybe">    2576:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">iterate_dir</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2577" /><span class="Maybe">    2577:</span> 
<a name="2578" /><span class="Maybe">    2578:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_stat</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2579" /><span class="Maybe">    2579:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_lstat</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2580" /><span class="Maybe">    2580:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_fstat</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">int</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2581" /><span class="Maybe">    2581:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">vfs_fstatat</span><span class="f">(</span><span class="m">int</span> <span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2582" /><span class="Maybe">    2582:</span> 
<a name="2583" /><span class="Maybe">    2583:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">do_vfs_ioctl</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">filp</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">fd</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">cmd</span><span class="f">,</span>
<a name="2584" /><span class="Maybe">    2584:</span>             <span class="m">unsigned</span> <span class="m">long</span> <span class="b">arg</span><span class="f">)</span><span class="f">;</span>
<a name="2585" /><span class="Maybe">    2585:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__generic_block_fiemap</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="2586" /><span class="Maybe">    2586:</span>                   <span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">*</span><span class="b">fieinfo</span><span class="f">,</span>
<a name="2587" /><span class="Maybe">    2587:</span>                   <span class="b">loff_t</span> <span class="b">start</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">len</span><span class="f">,</span>
<a name="2588" /><span class="Maybe">    2588:</span>                   <span class="b">get_block_t</span> <span class="f">*</span><span class="b">get_block</span><span class="f">)</span><span class="f">;</span>
<a name="2589" /><span class="Maybe">    2589:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_block_fiemap</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span>
<a name="2590" /><span class="Maybe">    2590:</span>                 <span class="m">struct</span> <span class="b">fiemap_extent_info</span> <span class="f">*</span><span class="b">fieinfo</span><span class="f">,</span> <span class="b">u64</span> <span class="b">start</span><span class="f">,</span>
<a name="2591" /><span class="Maybe">    2591:</span>                 <span class="b">u64</span> <span class="b">len</span><span class="f">,</span> <span class="b">get_block_t</span> <span class="f">*</span><span class="b">get_block</span><span class="f">)</span><span class="f">;</span>
<a name="2592" /><span class="Maybe">    2592:</span> 
<a name="2593" /><span class="Maybe">    2593:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">get_filesystem</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs</span><span class="f">)</span><span class="f">;</span>
<a name="2594" /><span class="Maybe">    2594:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">put_filesystem</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">fs</span><span class="f">)</span><span class="f">;</span>
<a name="2595" /><span class="Maybe">    2595:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="b">get_fs_type</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">)</span><span class="f">;</span>
<a name="2596" /><span class="Maybe">    2596:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">get_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2597" /><span class="Maybe">    2597:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">get_super_thawed</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2598" /><span class="Maybe">    2598:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">get_active_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">block_device</span> <span class="f">*</span><span class="b">bdev</span><span class="f">)</span><span class="f">;</span>
<a name="2599" /><span class="Maybe">    2599:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">drop_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">)</span><span class="f">;</span>
<a name="2600" /><span class="Maybe">    2600:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">iterate_supers</span><span class="f">(</span><span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2601" /><span class="Maybe">    2601:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">iterate_supers_type</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">,</span>
<a name="2602" /><span class="Maybe">    2602:</span>                     <span class="m">void</span> <span class="f">(</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2603" /><span class="Maybe">    2603:</span> 
<a name="2604" /><span class="Maybe">    2604:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">dcache_dir_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2605" /><span class="Maybe">    2605:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">dcache_dir_close</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2606" /><span class="Maybe">    2606:</span> <span class="m">extern</span> <span class="b">loff_t</span> <span class="b">dcache_dir_lseek</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2607" /><span class="Maybe">    2607:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">dcache_readdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2608" /><span class="Maybe">    2608:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_setattr</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2609" /><span class="Maybe">    2609:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_getattr</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstat</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2610" /><span class="Maybe">    2610:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_statfs</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">kstatfs</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2611" /><span class="Maybe">    2611:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="2612" /><span class="Maybe">    2612:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_link</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2613" /><span class="Maybe">    2613:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_unlink</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2614" /><span class="Maybe">    2614:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_rmdir</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2615" /><span class="Maybe">    2615:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_rename</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2616" /><span class="Maybe">    2616:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">noop_fsync</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2617" /><span class="Maybe">    2617:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_empty</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2618" /><span class="Maybe">    2618:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_readpage</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">)</span><span class="f">;</span>
<a name="2619" /><span class="Maybe">    2619:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_write_begin</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2620" /><span class="Maybe">    2620:</span>             <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">flags</span><span class="f">,</span>
<a name="2621" /><span class="Maybe">    2621:</span>             <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">*</span><span class="b">pagep</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="2622" /><span class="Maybe">    2622:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_write_end</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="b">mapping</span><span class="f">,</span>
<a name="2623" /><span class="Maybe">    2623:</span>             <span class="b">loff_t</span> <span class="b">pos</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">len</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">copied</span><span class="f">,</span>
<a name="2624" /><span class="Maybe">    2624:</span>             <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="b">page</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">fsdata</span><span class="f">)</span><span class="f">;</span>
<a name="2625" /><span class="Maybe">    2625:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">always_delete_dentry</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2626" /><span class="Maybe">    2626:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">alloc_anon_inode</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2627" /><span class="Maybe">    2627:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">dentry_operations</span> <span class="b">simple_dentry_operations</span><span class="f">;</span>
<a name="2628" /><span class="Maybe">    2628:</span> 
<a name="2629" /><span class="Maybe">    2629:</span> <span class="m">extern</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">simple_lookup</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">int</span> <span class="b">flags</span><span class="f">)</span><span class="f">;</span>
<a name="2630" /><span class="Maybe">    2630:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">generic_read_dir</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="f">,</span> <span class="b">size_t</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2631" /><span class="Maybe">    2631:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">simple_dir_operations</span><span class="f">;</span>
<a name="2632" /><span class="Maybe">    2632:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">inode_operations</span> <span class="b">simple_dir_inode_operations</span><span class="f">;</span>
<a name="2633" /><span class="Maybe">    2633:</span> <span class="m">struct</span> <span class="b">tree_descr</span> <span class="f">{</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">;</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="f">*</span><span class="b">ops</span><span class="f">;</span> <span class="m">int</span> <span class="b">mode</span><span class="f">;</span> <span class="f">}</span><span class="f">;</span>
<a name="2634" /><span class="Maybe">    2634:</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">d_alloc_name</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2635" /><span class="Maybe">    2635:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_fill_super</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="f">,</span> <span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="m">struct</span> <span class="b">tree_descr</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2636" /><span class="Maybe">    2636:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">simple_pin_fs</span><span class="f">(</span><span class="m">struct</span> <span class="b">file_system_type</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">*</span><span class="b">mount</span><span class="f">,</span> <span class="m">int</span> <span class="f">*</span><span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="2637" /><span class="Maybe">    2637:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">simple_release_fs</span><span class="f">(</span><span class="m">struct</span> <span class="b">vfsmount</span> <span class="f">*</span><span class="f">*</span><span class="b">mount</span><span class="f">,</span> <span class="m">int</span> <span class="f">*</span><span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="2638" /><span class="Maybe">    2638:</span> 
<a name="2639" /><span class="Maybe">    2639:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">simple_read_from_buffer</span><span class="f">(</span><span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">to</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">count</span><span class="f">,</span>
<a name="2640" /><span class="Maybe">    2640:</span>             <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">,</span> <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">from</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">available</span><span class="f">)</span><span class="f">;</span>
<a name="2641" /><span class="Maybe">    2641:</span> <span class="m">extern</span> <span class="b">ssize_t</span> <span class="b">simple_write_to_buffer</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="b">to</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">available</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">,</span>
<a name="2642" /><span class="Maybe">    2642:</span>         <span class="m">const</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">from</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">count</span><span class="f">)</span><span class="f">;</span>
<a name="2643" /><span class="Maybe">    2643:</span> 
<a name="2644" /><span class="Maybe">    2644:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_file_fsync</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="b">loff_t</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2645" /><span class="Maybe">    2645:</span> 
<a name="2646" /><span class="Maybe">    2646:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_check_addressable</span><span class="f">(</span><span class="m">unsigned</span><span class="f">,</span> <span class="b">u64</span><span class="f">)</span><span class="f">;</span>
<a name="2647" /><span class="Maybe">    2647:</span> 
<a name="2648" /><span class="Maybe">    2648:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX01JR1JBVElPTl8w"><span class="b">CONFIG_MIGRATION</span></a>
<a name="2649" /><span class="Maybe">    2649:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">buffer_migrate_page</span><span class="f">(</span><span class="m">struct</span> <span class="b">address_space</span> <span class="f">*</span><span class="f">,</span>
<a name="2650" /><span class="Maybe">    2650:</span>                 <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">page</span> <span class="f">*</span><span class="f">,</span>
<a name="2651" /><span class="Maybe">    2651:</span>                 <span class="m">enum</span> <span class="b">migrate_mode</span><span class="f">)</span><span class="f">;</span>
<a name="2652" /><span class="False">    2652:</span> <span class="f">#</span><span class="n">else</span>
<a name="2653" /><span class="False">    2653:</span> <span class="f">#</span><span class="n">define</span> <span class="b">buffer_migrate_page</span> <a href="cpu.c_macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a>
<a name="2654" /><span class="Maybe">    2654:</span> <span class="f">#</span><span class="n">endif</span>
<a name="2655" /><span class="Maybe">    2655:</span> 
<a name="2656" /><span class="Maybe">    2656:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">inode_change_ok</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2657" /><span class="Maybe">    2657:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">inode_newsize_ok</span><span class="f">(</span><span class="m">const</span> <span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="f">,</span> <span class="b">loff_t</span> <span class="b">offset</span><span class="f">)</span><span class="f">;</span>
<a name="2658" /><span class="Maybe">    2658:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">setattr_copy</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">iattr</span> <span class="f">*</span><span class="b">attr</span><span class="f">)</span><span class="f">;</span>
<a name="2659" /><span class="Maybe">    2659:</span> 
<a name="2660" /><span class="Maybe">    2660:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">file_update_time</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="2661" /><span class="Maybe">    2661:</span> 
<a name="2662" /><span class="Maybe">    2662:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">generic_show_options</span><span class="f">(</span><span class="m">struct</span> <span class="b">seq_file</span> <span class="f">*</span><span class="b">m</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">root</span><span class="f">)</span><span class="f">;</span>
<a name="2663" /><span class="Maybe">    2663:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">save_mount_options</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">options</span><span class="f">)</span><span class="f">;</span>
<a name="2664" /><span class="Maybe">    2664:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">replace_mount_options</span><span class="f">(</span><span class="m">struct</span> <span class="b">super_block</span> <span class="f">*</span><span class="b">sb</span><span class="f">,</span> <span class="m">char</span> <span class="f">*</span><span class="b">options</span><span class="f">)</span><span class="f">;</span>
<a name="2665" /><span class="Maybe">    2665:</span> 
<a name="2666" /><span class="Maybe">    2666:</span> <span class="m">static</span> <span class="m">inline</span> <span class="b">ino_t</span> <span class="b">parent_ino</span><span class="f">(</span><span class="m">struct</span> <span class="b">dentry</span> <span class="f">*</span><span class="b">dentry</span><span class="f">)</span>
<a name="2667" /><span class="Maybe">    2667:</span> <span class="f">{</span>
<a name="2668" /><span class="Maybe">    2668:</span>     <span class="b">ino_t</span> <span class="b">res</span><span class="f">;</span>
<a name="2669" /><span class="Maybe">    2669:</span> 
<a name="2670" /><span class="Maybe">    2670:</span>     <span class="k">/*</span>
<a name="2671" /><span class="Maybe">    2671:</span> <span class="k">     * Don&apos;t strictly need d_lock here? If the parent ino could change</span>
<a name="2672" /><span class="Maybe">    2672:</span> <span class="k">     * then surely we&apos;d have a deeper race in the caller?</span>
<a name="2673" /><span class="Maybe">    2673:</span> <span class="k">     */</span>
<a name="2674" /><span class="Maybe">    2674:</span>     <span class="b">spin_lock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">dentry</span><span class="f">-&gt;</span><a href="cpu.c_macros_ref.html#_ZF9sb2NrXzA_"><span class="b">d_lock</span></a><span class="f">)</span><span class="f">;</span>
<a name="2675" /><span class="Maybe">    2675:</span>     <span class="b">res</span> <span class="f">=</span> <span class="b">dentry</span><span class="f">-&gt;</span><span class="b">d_parent</span><span class="f">-&gt;</span><span class="b">d_inode</span><span class="f">-&gt;</span><span class="b">i_ino</span><span class="f">;</span>
<a name="2676" /><span class="Maybe">    2676:</span>     <span class="b">spin_unlock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">dentry</span><span class="f">-&gt;</span><a href="cpu.c_macros_ref.html#_ZF9sb2NrXzA_"><span class="b">d_lock</span></a><span class="f">)</span><span class="f">;</span>
<a name="2677" /><span class="Maybe">    2677:</span>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="2678" /><span class="Maybe">    2678:</span> <span class="f">}</span>
<a name="2679" /><span class="Maybe">    2679:</span> 
<a name="2680" /><span class="Maybe">    2680:</span> <span class="k">/* Transaction based IO helpers */</span>
<a name="2681" /><span class="Maybe">    2681:</span> 
<a name="2682" /><span class="Maybe">    2682:</span> <span class="k">/*</span>
<a name="2683" /><span class="Maybe">    2683:</span> <span class="k"> * An argresp is stored in an allocated page and holds the</span>
<a name="2684" /><span class="Maybe">    2684:</span> <span class="k"> * size of the argument or response, along with its content</span>
<a name="2685" /><span class="Maybe">    2685:</span> <span class="k"> */</span>
<a name="2686" /><span class="Maybe">    2686:</span> <span class="m">struct</span> <span class="b">simple_transaction_argresp</span> <span class="f">{</span>
<a name="2687" /><span class="Maybe">    2687:</span>     <span class="b">ssize_t</span> <span class="b">size</span><span class="f">;</span>
<a name="2688" /><span class="Maybe">    2688:</span>     <span class="m">char</span> <span class="b">data</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">;</span>
<a name="2689" /><span class="Maybe">    2689:</span> <span class="f">}</span><span class="f">;</span>
<a name="2690" /><span class="Maybe">    2690:</span> 
<a name="2691" /><span class="Maybe">    2691:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_U0lNUExFX1RSQU5TQUNUSU9OX0xJTUlUXzA_"><span class="b">SIMPLE_TRANSACTION_LIMIT</span></a> <span class="f">(</span><a href="cpu.c_macros_ref.html#_UEFHRV9TSVpFXzA_"><span class="b">PAGE_SIZE</span></a> <span class="f">-</span> <span class="m">sizeof</span><span class="f">(</span><span class="m">struct</span> <span class="b">simple_transaction_argresp</span><span class="f">)</span><span class="f">)</span>
<a name="2692" /><span class="Maybe">    2692:</span> 
<a name="2693" /><span class="Maybe">    2693:</span> <span class="m">char</span> <span class="f">*</span><span class="b">simple_transaction_get</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span>
<a name="2694" /><span class="Maybe">    2694:</span>                 <span class="b">size_t</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="2695" /><span class="Maybe">    2695:</span> <span class="b">ssize_t</span> <span class="b">simple_transaction_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span>
<a name="2696" /><span class="Maybe">    2696:</span>                 <span class="b">size_t</span> <span class="b">size</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">pos</span><span class="f">)</span><span class="f">;</span>
<a name="2697" /><span class="Maybe">    2697:</span> <span class="m">int</span> <span class="b">simple_transaction_release</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="2698" /><span class="Maybe">    2698:</span> 
<a name="2699" /><span class="Maybe">    2699:</span> <span class="m">void</span> <span class="b">simple_transaction_set</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2700" /><span class="Maybe">    2700:</span> 
<a name="2701" /><span class="Maybe">    2701:</span> <span class="k">/*</span>
<a name="2702" /><span class="Maybe">    2702:</span> <span class="k"> * simple attribute files</span>
<a name="2703" /><span class="Maybe">    2703:</span> <span class="k"> *</span>
<a name="2704" /><span class="Maybe">    2704:</span> <span class="k"> * These attributes behave similar to those in sysfs:</span>
<a name="2705" /><span class="Maybe">    2705:</span> <span class="k"> *</span>
<a name="2706" /><span class="Maybe">    2706:</span> <span class="k"> * Writing to an attribute immediately sets a value, an open file can be</span>
<a name="2707" /><span class="Maybe">    2707:</span> <span class="k"> * written to multiple times.</span>
<a name="2708" /><span class="Maybe">    2708:</span> <span class="k"> *</span>
<a name="2709" /><span class="Maybe">    2709:</span> <span class="k"> * Reading from an attribute creates a buffer from the value that might get</span>
<a name="2710" /><span class="Maybe">    2710:</span> <span class="k"> * read with multiple read calls. When the attribute has been read</span>
<a name="2711" /><span class="Maybe">    2711:</span> <span class="k"> * completely, no further read calls are possible until the file is opened</span>
<a name="2712" /><span class="Maybe">    2712:</span> <span class="k"> * again.</span>
<a name="2713" /><span class="Maybe">    2713:</span> <span class="k"> *</span>
<a name="2714" /><span class="Maybe">    2714:</span> <span class="k"> * All attributes contain a text representation of a numeric value</span>
<a name="2715" /><span class="Maybe">    2715:</span> <span class="k"> * that are accessed with the get() and set() functions.</span>
<a name="2716" /><span class="Maybe">    2716:</span> <span class="k"> */</span>
<a name="2717" /><span class="Maybe">    2717:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_REVGSU5FX1NJTVBMRV9BVFRSSUJVVEVfMA__"><span class="b">DEFINE_SIMPLE_ATTRIBUTE</span></a><span class="f">(</span><span class="b">__fops</span><span class="f">,</span> <span class="b">__get</span><span class="f">,</span> <span class="b">__set</span><span class="f">,</span> <span class="b">__fmt</span><span class="f">)</span>        \
<a name="2718" /><span class="Maybe">    2718:</span> <span class="m">static</span> <span class="m">int</span> <span class="b">__fops</span> <span class="f">##</span> <span class="b">_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span>    \
<a name="2719" /><span class="Maybe">    2719:</span> <span class="f">{</span>                                    \
<a name="2720" /><span class="Maybe">    2720:</span>     <span class="b">__simple_attr_check_format</span><span class="f">(</span><span class="b">__fmt</span><span class="f">,</span> <span class="c">0ull</span><span class="f">)</span><span class="f">;</span>            \
<a name="2721" /><span class="Maybe">    2721:</span>     <span class="m">return</span> <span class="b">simple_attr_open</span><span class="f">(</span><span class="b">inode</span><span class="f">,</span> <span class="b">file</span><span class="f">,</span> <span class="b">__get</span><span class="f">,</span> <span class="b">__set</span><span class="f">,</span> <span class="b">__fmt</span><span class="f">)</span><span class="f">;</span>    \
<a name="2722" /><span class="Maybe">    2722:</span> <span class="f">}</span>                                    \
<a name="2723" /><span class="Maybe">    2723:</span> <span class="m">static</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">__fops</span> <span class="f">=</span> <span class="f">{</span>                \
<a name="2724" /><span class="Maybe">    2724:</span>     <span class="f">.</span><span class="b">owner</span>     <span class="f">=</span> <a href="cpu.c_macros_noref.html#_VEhJU19NT0RVTEVfMA__"><span class="b">THIS_MODULE</span></a><span class="f">,</span>                        \
<a name="2725" /><span class="Maybe">    2725:</span>     <span class="f">.</span><span class="b">open</span>     <span class="f">=</span> <span class="b">__fops</span> <span class="f">##</span> <span class="b">_open</span><span class="f">,</span>                    \
<a name="2726" /><span class="Maybe">    2726:</span>     <span class="f">.</span><span class="b">release</span> <span class="f">=</span> <span class="b">simple_attr_release</span><span class="f">,</span>                    \
<a name="2727" /><span class="Maybe">    2727:</span>     <span class="f">.</span><span class="b">read</span>     <span class="f">=</span> <span class="b">simple_attr_read</span><span class="f">,</span>                    \
<a name="2728" /><span class="Maybe">    2728:</span>     <span class="f">.</span><span class="b">write</span>     <span class="f">=</span> <span class="b">simple_attr_write</span><span class="f">,</span>                    \
<a name="2729" /><span class="Maybe">    2729:</span>     <span class="f">.</span><span class="b">llseek</span>     <span class="f">=</span> <span class="b">generic_file_llseek</span><span class="f">,</span>                    \
<a name="2730" /><span class="Maybe">    2730:</span> <span class="f">}</span><span class="f">;</span>
<a name="2731" /><span class="Maybe">    2731:</span> 
<a name="2732" /><span class="Maybe">    2732:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span>
<a name="2733" /><span class="Maybe">    2733:</span> <span class="m">void</span> <span class="b">__simple_attr_check_format</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>
<a name="2734" /><span class="Maybe">    2734:</span> <span class="f">{</span>
<a name="2735" /><span class="Maybe">    2735:</span>     <span class="k">/* don&apos;t do anything, just let the compiler check the arguments; */</span>
<a name="2736" /><span class="Maybe">    2736:</span> <span class="f">}</span>
<a name="2737" /><span class="Maybe">    2737:</span> 
<a name="2738" /><span class="Maybe">    2738:</span> <span class="m">int</span> <span class="b">simple_attr_open</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span>
<a name="2739" /><span class="Maybe">    2739:</span>              <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">get</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="b">u64</span> <span class="f">*</span><span class="f">)</span><span class="f">,</span> <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">set</span><span class="f">)</span><span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">,</span> <span class="b">u64</span><span class="f">)</span><span class="f">,</span>
<a name="2740" /><span class="Maybe">    2740:</span>              <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">)</span><span class="f">;</span>
<a name="2741" /><span class="Maybe">    2741:</span> <span class="m">int</span> <span class="b">simple_attr_release</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">,</span> <span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">)</span><span class="f">;</span>
<a name="2742" /><span class="Maybe">    2742:</span> <span class="b">ssize_t</span> <span class="b">simple_attr_read</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span>
<a name="2743" /><span class="Maybe">    2743:</span>              <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2744" /><span class="Maybe">    2744:</span> <span class="b">ssize_t</span> <span class="b">simple_attr_write</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buf</span><span class="f">,</span>
<a name="2745" /><span class="Maybe">    2745:</span>               <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2746" /><span class="Maybe">    2746:</span> 
<a name="2747" /><span class="Maybe">    2747:</span> <span class="m">struct</span> <span class="b">ctl_table</span><span class="f">;</span>
<a name="2748" /><span class="Maybe">    2748:</span> <span class="m">int</span> <span class="b">proc_nr_files</span><span class="f">(</span><span class="m">struct</span> <span class="b">ctl_table</span> <span class="f">*</span><span class="b">table</span><span class="f">,</span> <span class="m">int</span> <span class="b">write</span><span class="f">,</span>
<a name="2749" /><span class="Maybe">    2749:</span>           <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buffer</span><span class="f">,</span> <span class="b">size_t</span> <span class="f">*</span><span class="b">lenp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2750" /><span class="Maybe">    2750:</span> <span class="m">int</span> <span class="b">proc_nr_dentry</span><span class="f">(</span><span class="m">struct</span> <span class="b">ctl_table</span> <span class="f">*</span><span class="b">table</span><span class="f">,</span> <span class="m">int</span> <span class="b">write</span><span class="f">,</span>
<a name="2751" /><span class="Maybe">    2751:</span>           <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buffer</span><span class="f">,</span> <span class="b">size_t</span> <span class="f">*</span><span class="b">lenp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2752" /><span class="Maybe">    2752:</span> <span class="m">int</span> <span class="b">proc_nr_inodes</span><span class="f">(</span><span class="m">struct</span> <span class="b">ctl_table</span> <span class="f">*</span><span class="b">table</span><span class="f">,</span> <span class="m">int</span> <span class="b">write</span><span class="f">,</span>
<a name="2753" /><span class="Maybe">    2753:</span>            <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a> <span class="f">*</span><span class="b">buffer</span><span class="f">,</span> <span class="b">size_t</span> <span class="f">*</span><span class="b">lenp</span><span class="f">,</span> <span class="b">loff_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">)</span><span class="f">;</span>
<a name="2754" /><span class="Maybe">    2754:</span> <span class="m">int</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">get_filesystem_list</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="b">buf</span><span class="f">)</span><span class="f">;</span>
<a name="2755" /><span class="Maybe">    2755:</span> 
<a name="2756" /><span class="Maybe">    2756:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19GTU9ERV9FWEVDXzA_"><span class="b">__FMODE_EXEC</span></a>        <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="m">int</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfRVhFQ18w"><span class="b">FMODE_EXEC</span></a><span class="f">)</span>
<a name="2757" /><span class="Maybe">    2757:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19GTU9ERV9OT05PVElGWV8w"><span class="b">__FMODE_NONOTIFY</span></a>    <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="m">int</span><span class="f">)</span> <a href="cpu.c_macros_noref.html#_Rk1PREVfTk9OT1RJRllfMA__"><span class="b">FMODE_NONOTIFY</span></a><span class="f">)</span>
<a name="2758" /><span class="Maybe">    2758:</span> 
<a name="2759" /><span class="Maybe">    2759:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_QUNDX01PREVfMA__"><span class="b">ACC_MODE</span></a><span class="f">(</span><span class="b">x</span><span class="f">)</span> <span class="f">(</span><span class="e">&quot;\004\002\006\006&quot;</span><span class="f">[</span><span class="f">(</span><span class="b">x</span><span class="f">)</span><span class="f">&amp;</span><a href="cpu.c_macros_noref.html#_T19BQ0NNT0RFXzA_"><span class="b">O_ACCMODE</span></a><span class="f">]</span><span class="f">)</span>
<a name="2760" /><span class="Maybe">    2760:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_T1BFTl9GTU9ERV8w"><span class="b">OPEN_FMODE</span></a><span class="f">(</span><span class="b">flag</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_X19mb3JjZV8w"><span class="b">__force</span></a> <span class="b">fmode_t</span><span class="f">)</span><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">flag</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_T19BQ0NNT0RFXzA_"><span class="b">O_ACCMODE</span></a><span class="f">)</span> <span class="f">|</span> \
<a name="2761" /><span class="Maybe">    2761:</span>                         <span class="f">(</span><span class="b">flag</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X19GTU9ERV9OT05PVElGWV8w"><span class="b">__FMODE_NONOTIFY</span></a><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="2762" /><span class="Maybe">    2762:</span> 
<a name="2763" /><span class="Maybe">    2763:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">is_sxid</span><span class="f">(</span><span class="b">umode_t</span> <span class="b">mode</span><span class="f">)</span>
<a name="2764" /><span class="Maybe">    2764:</span> <span class="f">{</span>
<a name="2765" /><span class="Maybe">    2765:</span>     <span class="m">return</span> <span class="f">(</span><span class="b">mode</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19JU1VJRF8w"><span class="b">S_ISUID</span></a><span class="f">)</span> <span class="f">||</span> <span class="f">(</span><span class="f">(</span><span class="b">mode</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19JU0dJRF8w"><span class="b">S_ISGID</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">(</span><span class="b">mode</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_U19JWEdSUF8w"><span class="b">S_IXGRP</span></a><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2766" /><span class="Maybe">    2766:</span> <span class="f">}</span>
<a name="2767" /><span class="Maybe">    2767:</span> 
<a name="2768" /><span class="Maybe">    2768:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">inode_has_no_xattr</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2769" /><span class="Maybe">    2769:</span> <span class="f">{</span>
<a name="2770" /><span class="Maybe">    2770:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">is_sxid</span><span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mode</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">(</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_sb</span><span class="f">-&gt;</span><span class="b">s_flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_TVNfTk9TRUNfMA__"><span class="b">MS_NOSEC</span></a><span class="f">)</span><span class="f">)</span>
<a name="2771" /><span class="Maybe">    2771:</span>         <span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_flags</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_U19OT1NFQ18w"><span class="b">S_NOSEC</span></a><span class="f">;</span>
<a name="2772" /><span class="Maybe">    2772:</span> <span class="f">}</span>
<a name="2773" /><span class="Maybe">    2773:</span> 
<a name="2774" /><span class="Maybe">    2774:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">dir_emit</span><span class="f">(</span><span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="b">ctx</span><span class="f">,</span>
<a name="2775" /><span class="Maybe">    2775:</span>                 <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">name</span><span class="f">,</span> <span class="m">int</span> <span class="b">namelen</span><span class="f">,</span>
<a name="2776" /><span class="Maybe">    2776:</span>                 <span class="b">u64</span> <span class="b">ino</span><span class="f">,</span> <span class="m">unsigned</span> <span class="b">type</span><span class="f">)</span>
<a name="2777" /><span class="Maybe">    2777:</span> <span class="f">{</span>
<a name="2778" /><span class="Maybe">    2778:</span>     <span class="m">return</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">actor</span><span class="f">(</span><span class="b">ctx</span><span class="f">,</span> <span class="b">name</span><span class="f">,</span> <span class="b">namelen</span><span class="f">,</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span><span class="f">,</span> <span class="b">ino</span><span class="f">,</span> <span class="b">type</span><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">;</span>
<a name="2779" /><span class="Maybe">    2779:</span> <span class="f">}</span>
<a name="2780" /><span class="Maybe">    2780:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">dir_emit_dot</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="b">ctx</span><span class="f">)</span>
<a name="2781" /><span class="Maybe">    2781:</span> <span class="f">{</span>
<a name="2782" /><span class="Maybe">    2782:</span>     <span class="m">return</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">actor</span><span class="f">(</span><span class="b">ctx</span><span class="f">,</span> <span class="e">&quot;.&quot;</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span><span class="f">,</span>
<a name="2783" /><span class="Maybe">    2783:</span>               <span class="b">file</span><span class="f">-&gt;</span><span class="b">f_path</span><span class="f">.</span><span class="b">dentry</span><span class="f">-&gt;</span><span class="b">d_inode</span><span class="f">-&gt;</span><span class="b">i_ino</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_RFRfRElSXzA_"><span class="b">DT_DIR</span></a><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">;</span>
<a name="2784" /><span class="Maybe">    2784:</span> <span class="f">}</span>
<a name="2785" /><span class="Maybe">    2785:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">dir_emit_dotdot</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="b">ctx</span><span class="f">)</span>
<a name="2786" /><span class="Maybe">    2786:</span> <span class="f">{</span>
<a name="2787" /><span class="Maybe">    2787:</span>     <span class="m">return</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">actor</span><span class="f">(</span><span class="b">ctx</span><span class="f">,</span> <span class="e">&quot;..&quot;</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span><span class="f">,</span>
<a name="2788" /><span class="Maybe">    2788:</span>               <span class="b">parent_ino</span><span class="f">(</span><span class="b">file</span><span class="f">-&gt;</span><span class="b">f_path</span><span class="f">.</span><span class="b">dentry</span><span class="f">)</span><span class="f">,</span> <a href="cpu.c_macros_ref.html#_RFRfRElSXzA_"><span class="b">DT_DIR</span></a><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">;</span>
<a name="2789" /><span class="Maybe">    2789:</span> <span class="f">}</span>
<a name="2790" /><span class="Maybe">    2790:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">dir_emit_dots</span><span class="f">(</span><span class="m">struct</span> <span class="b">file</span> <span class="f">*</span><span class="b">file</span><span class="f">,</span> <span class="m">struct</span> <span class="b">dir_context</span> <span class="f">*</span><span class="b">ctx</span><span class="f">)</span>
<a name="2791" /><span class="Maybe">    2791:</span> <span class="f">{</span>
<a name="2792" /><span class="Maybe">    2792:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2793" /><span class="Maybe">    2793:</span>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">dir_emit_dot</span><span class="f">(</span><span class="b">file</span><span class="f">,</span> <span class="b">ctx</span><span class="f">)</span><span class="f">)</span>
<a name="2794" /><span class="Maybe">    2794:</span>             <span class="m">return</span> <span class="m">false</span><span class="f">;</span>
<a name="2795" /><span class="Maybe">    2795:</span>         <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="2796" /><span class="Maybe">    2796:</span>     <span class="f">}</span>
<a name="2797" /><span class="Maybe">    2797:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="2798" /><span class="Maybe">    2798:</span>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">dir_emit_dotdot</span><span class="f">(</span><span class="b">file</span><span class="f">,</span> <span class="b">ctx</span><span class="f">)</span><span class="f">)</span>
<a name="2799" /><span class="Maybe">    2799:</span>             <span class="m">return</span> <span class="m">false</span><span class="f">;</span>
<a name="2800" /><span class="Maybe">    2800:</span>         <span class="b">ctx</span><span class="f">-&gt;</span><span class="b">pos</span> <span class="f">=</span> <span class="c">2</span><span class="f">;</span>
<a name="2801" /><span class="Maybe">    2801:</span>     <span class="f">}</span>
<a name="2802" /><span class="Maybe">    2802:</span>     <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="2803" /><span class="Maybe">    2803:</span> <span class="f">}</span>
<a name="2804" /><span class="Maybe">    2804:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">dir_relax</span><span class="f">(</span><span class="m">struct</span> <span class="b">inode</span> <span class="f">*</span><span class="b">inode</span><span class="f">)</span>
<a name="2805" /><span class="Maybe">    2805:</span> <span class="f">{</span>
<a name="2806" /><span class="Maybe">    2806:</span>     <span class="b">mutex_unlock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mutex</span><span class="f">)</span><span class="f">;</span>
<a name="2807" /><span class="Maybe">    2807:</span>     <span class="b">mutex_lock</span><span class="f">(</span><span class="f">&amp;</span><span class="b">inode</span><span class="f">-&gt;</span><span class="b">i_mutex</span><span class="f">)</span><span class="f">;</span>
<a name="2808" /><span class="Maybe">    2808:</span>     <span class="m">return</span> <span class="f">!</span><a href="cpu.c_macros_ref.html#_SVNfREVBRERJUl8w"><span class="b">IS_DEADDIR</span></a><span class="f">(</span><span class="b">inode</span><span class="f">)</span><span class="f">;</span>
<a name="2809" /><span class="Maybe">    2809:</span> <span class="f">}</span>
<a name="2810" /><span class="Maybe">    2810:</span> 
<a name="2811" /><span class="True">    2811:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* _LINUX_FS_H */</span>
<a name="2812" /><span class="True">    2812:</span> </pre>
  </body>
</html>
